5#include "protocol/SystemMessages.hpp"
7namespace rtype::protocol {
36 return static_cast<std::uint16_t
>(type);
constexpr std::uint16_t toMessageId(MessageType type)
Converts a message type to its wire identifier.
Definition MessageType.hpp:35
MessageType
Type identifier of every message exchanged on a connection.
Definition MessageType.hpp:16
@ Input
Client to server: actions held by the player.
@ Disconnect
Client to server: closes the connection.
@ Invalid
Never sent, marks an unset type.
@ Pong
Server to client: answer to a Ping.
@ DestroyEntity
Server to client: removes an entity.
@ QueryEntity
Client to server: asks for an unknown entity.
@ Ping
Client to server: latency probe.
@ CreateEntity
Server to client: spawns an entity.
@ Snapshot
Server to client: positions of the entities.