11#include <boost/asio.hpp>
158 template <
class Packet>
160 std::string
data = serialize<Packet>(packet);
173 std::array<boost::asio::const_buffer, 2>
toBuffer() {
176 boost::asio::buffer(this->
data)
Definition: packet.hpp:145
std::array< boost::asio::const_buffer, 2 > toBuffer()
Definition: packet.hpp:173
static std::shared_ptr< PackagedPacket > make_shared(PacketType type, Packet packet)
Definition: packet.hpp:159
~PackagedPacket()=default
GLboolean * data
Definition: glad.h:1600
GLuint buffer
Definition: glad.h:1791
GLint GLint GLsizei GLint GLenum GLenum type
Definition: glad.h:1531
GLboolean GLboolean GLboolean GLboolean a
Definition: glad.h:2133
GLsizeiptr size
Definition: glad.h:1803
PacketType
Definition: packet.hpp:30
@ ServerLobbyBroadcast
Sent by the server via UDP broadcast saying it has a server open.
@ ClientDeclareInfo
Sent by the client after TCP handshake.
@ ServerAssignEID
Sent by the server after TCP handshake, giving client its EID.
Definition: packet.hpp:109
std::string player_name
Name that the client wishes to be called by.
Definition: packet.hpp:111
DEF_SERIALIZE(Archive &ar, const unsigned int version)
Definition: packet.hpp:113
Definition: packet.hpp:132
Event event
Definition: packet.hpp:133
DEF_SERIALIZE(Archive &ar, const unsigned int version)
Definition: packet.hpp:135
Definition: event.hpp:348
Definition: packet.hpp:122
bool is_dungeon_master
Definition: packet.hpp:125
EntityID eid
ID that the server is assigning to the client.
Definition: packet.hpp:124
DEF_SERIALIZE(Archive &ar, const unsigned int version)
Definition: packet.hpp:127
Definition: packet.hpp:90
int slots_avail
How many more clients can join this lobby.
Definition: packet.hpp:96
std::string lobby_name
Name of the server lobby.
Definition: packet.hpp:92
DEF_SERIALIZE(Archive &ar, const unsigned int version)
Definition: packet.hpp:98
int slots_taken
How many clients are already in this lobby.
Definition: packet.hpp:94
uint32_t EntityID
Global Object ID (when the server or client references an object with a particular EntityID,...
Definition: typedefs.hpp:9