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

27 lines
751 B
C++

#ifndef OPENMW_WORLDSTATEPACKETCONTROLLER_HPP
#define OPENMW_WORLDSTATEPACKETCONTROLLER_HPP
#include <RakPeerInterface.h>
#include "../Packets/Worldstate/WorldstatePacket.hpp"
#include <unordered_map>
#include <memory>
namespace mwmp
{
class WorldstatePacketController
{
public:
WorldstatePacketController(RakNet::RakPeerInterface *peer);
WorldstatePacket *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<WorldstatePacket> > packets_t;
private:
packets_t packets;
};
}
#endif //OPENMW_WORLDSTATEPACKETCONTROLLER_HPP