3#include <unordered_map>
71 packetInfo getPacketInfo(
const uint8_t * buffer,
const size_t & size)
const;
87 std::unordered_map<IPacket::Type, std::shared_ptr<IPacket>> m_packets;
a bufferised and thread safe RAII wrapper for a socket representing a connection.
Definition: Connection.hpp:29
Type
Definition: IPacket.hpp:48
Definition: PacketFactory.hpp:8
~PacketFactory()
Definition: PacketFactory.cpp:33
PacketFactory(PacketFactory &&other)=delete
PacketFactory(const PacketFactory &other)=delete
PacketFactory & operator=(const PacketFactory &other)=delete
std::pair< bool, std::shared_ptr< IPacket > > extractPacket(Connection &connection)
Will try to extract a packet from the connection's buffer.
Definition: PacketFactory.cpp:93
PacketFactory & operator=(PacketFactory &&other)=delete
static PacketFactory & GetInstance()
Get a ref to the singleton instance of the PacketFactory.
Definition: PacketFactory.cpp:110