You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openmw-tes3coop/components/openmw-mp/Controllers/PlayerPacketController.hpp

26 lines
652 B
C++

#ifndef OPENMW_PLAYERPACKETCONTROLLER_HPP
#define OPENMW_PLAYERPACKETCONTROLLER_HPP
#include <RakPeerInterface.h>
#include "../Packets/PlayerPacket.hpp"
#include <map>
#include <boost/shared_ptr.hpp>
namespace mwmp
{
class PlayerPacketController
{
public:
PlayerPacketController(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_PLAYERPACKETCONTROLLER_HPP