openmw-tes3coop/components/openmw-mp/PacketsController.hpp

30 lines
666 B
C++
Raw Normal View History

//
// Created by koncord on 15.01.16.
//
#ifndef OPENMW_PACKETSCONTROLLER_HPP
#define OPENMW_PACKETSCONTROLLER_HPP
#include <RakPeerInterface.h>
2016-10-17 12:54:36 +00:00
#include "Packets/PlayerPacket.hpp"
2016-08-29 12:26:22 +00:00
#include <map>
#include <boost/shared_ptr.hpp>
namespace mwmp
{
class PacketsController
{
public:
PacketsController(RakNet::RakPeerInterface *peer);
2016-10-17 12:54:36 +00:00
PlayerPacket *GetPacket(RakNet::MessageID id);
void SetStream(RakNet::BitStream *inStream, RakNet::BitStream *outStream);
2016-10-17 12:54:36 +00:00
typedef std::map<unsigned char, boost::shared_ptr<PlayerPacket> > packets_t;
private:
2016-08-29 12:26:22 +00:00
packets_t packets;
};
}
#endif //OPENMW_PACKETSCONTROLLER_HPP