1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-21 09:23:51 +00:00
openmw-tes3mp/components/openmw-mp/PacketsController.hpp
2016-10-17 15:54:36 +03:00

29 lines
666 B
C++

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