1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-15 15:49:56 +00:00
openmw-tes3mp/components/openmw-mp/Controllers/PlayerPacketController.hpp

28 lines
715 B
C++
Raw Normal View History

#ifndef OPENMW_PLAYERPACKETCONTROLLER_HPP
#define OPENMW_PLAYERPACKETCONTROLLER_HPP
#include <RakPeerInterface.h>
#include "../Packets/Player/PlayerPacket.hpp"
#include <unordered_map>
#include <memory>
namespace mwmp
{
class PlayerPacketController
{
public:
PlayerPacketController(RakNet::RakPeerInterface *peer);
2016-10-17 12:54:36 +00:00
PlayerPacket *GetPacket(RakNet::MessageID id);
void SetStream(RakNet::BitStream *inStream, RakNet::BitStream *outStream);
bool ContainsPacket(RakNet::MessageID id);
typedef std::unordered_map<unsigned char, std::unique_ptr<PlayerPacket> > packets_t;
private:
2016-08-29 12:26:22 +00:00
packets_t packets;
};
}
#endif //OPENMW_PLAYERPACKETCONTROLLER_HPP