1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-15 21:19:57 +00:00
openmw-tes3mp/components/openmw-mp/PacketsController.hpp

30 lines
660 B
C++
Raw Normal View History

//
// Created by koncord on 15.01.16.
//
#ifndef OPENMW_PACKETSCONTROLLER_HPP
#define OPENMW_PACKETSCONTROLLER_HPP
#include <RakPeerInterface.h>
#include "Packets/BasePacket.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);
BasePacket *GetPacket(RakNet::MessageID id);
void SetStream(RakNet::BitStream *inStream, RakNet::BitStream *outStream);
2016-08-29 12:26:22 +00:00
typedef std::map<unsigned char, boost::shared_ptr<BasePacket> > packets_t;
private:
2016-08-29 12:26:22 +00:00
packets_t packets;
};
}
#endif //OPENMW_PACKETSCONTROLLER_HPP