mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-15 19:19:55 +00:00
28 lines
715 B
C++
28 lines
715 B
C++
|
#ifndef OPENMW_SYSTEMPACKETCONTROLLER_HPP
|
||
|
#define OPENMW_SYSTEMPACKETCONTROLLER_HPP
|
||
|
|
||
|
|
||
|
#include <RakPeerInterface.h>
|
||
|
#include "../Packets/System/SystemPacket.hpp"
|
||
|
#include <unordered_map>
|
||
|
#include <memory>
|
||
|
|
||
|
namespace mwmp
|
||
|
{
|
||
|
class SystemPacketController
|
||
|
{
|
||
|
public:
|
||
|
SystemPacketController(RakNet::RakPeerInterface *peer);
|
||
|
SystemPacket *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<SystemPacket> > packets_t;
|
||
|
private:
|
||
|
packets_t packets;
|
||
|
};
|
||
|
}
|
||
|
|
||
|
#endif //OPENMW_SYSTEMPACKETCONTROLLER_HPP
|