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-tes3mp/components/openmw-mp/Controllers/ActorPacketController.hpp

28 lines
710 B
C++

#ifndef OPENMW_ACTORPACKETCONTROLLER_HPP
#define OPENMW_ACTORPACKETCONTROLLER_HPP
#include <RakPeerInterface.h>
#include "../Packets/Actor/ActorPacket.hpp"
#include <unordered_map>
#include <memory>
namespace mwmp
{
class ActorPacketController
{
public:
ActorPacketController(RakNet::RakPeerInterface *peer);
ActorPacket *GetPacket(RakNet::MessageID id);
void SetStream(RakNet::BitStream *inStream, RakNet::BitStream *outStream);
bool ContainsPacket(RakNet::MessageID id);
typedef std::unordered_map<RakNet::MessageID, std::unique_ptr<ActorPacket> > packets_t;
private:
packets_t packets;
};
}
#endif //OPENMW_ACTORPACKETCONTROLLER_HPP