struct _ENetHost ENetHost
Definition: NetClient.h:37
struct _ENetPeer ENetPeer
Definition: NetHost.h:30
NetDisconnectReason
Reasons sent by server to clients in disconnection messages.
Definition: NetHost.h:63
@ NDR_INCORRECT_PROTOCOL_VERSION
Definition: NetHost.h:66
@ NDR_BANNED
Definition: NetHost.h:70
@ NDR_SERVER_LOADING
Definition: NetHost.h:67
@ NDR_STUN_PORT_FAILED
Definition: NetHost.h:78
@ NDR_SERVER_ALREADY_IN_GAME
Definition: NetHost.h:68
@ NDR_INCORRECT_READY_TURN_COMMANDS
Definition: NetHost.h:75
@ NDR_KICKED
Definition: NetHost.h:69
@ NDR_GUID_FAILED
Definition: NetHost.h:74
@ NDR_SERVER_FULL
Definition: NetHost.h:72
@ NDR_STUN_ENDPOINT_FAILED
Definition: NetHost.h:79
@ NDR_SERVER_REFUSED
Definition: NetHost.h:77
@ NDR_INCORRECT_READY_TURN_SIMULATED
Definition: NetHost.h:76
@ NDR_LOBBY_AUTH_FAILED
Definition: NetHost.h:73
@ NDR_PLAYERNAME_IN_USE
Definition: NetHost.h:71
@ NDR_SERVER_SHUTDOWN
Definition: NetHost.h:65
@ NDR_UNKNOWN
Definition: NetHost.h:64
std::map< CStr, PlayerAssignment > PlayerAssignmentMap
Definition: NetHost.h:54
struct _ENetPacket ENetPacket
Definition: NetHost.h:31
static ENetPacket * CreatePacket(const CNetMessage *message)
Construct an ENet packet by serialising the given message.
Definition: NetHost.cpp:49
static void Deinitialize()
Deinitialize ENet.
Definition: NetHost.cpp:76
static void Initialize()
Initialize ENet.
Definition: NetHost.cpp:70
static bool SendMessage(const CNetMessage *message, ENetPeer *peer, const char *peerName)
Transmit a message to the given peer.
Definition: NetHost.cpp:26
static const int DEFAULT_CHANNEL
Definition: NetHost.h:85
The base class for all network messages exchanged within the game.
Definition: NetMessage.h:33
bool m_Enabled
Whether the player is currently connected and active.
Definition: NetHost.h:42
CStrW m_Name
Player name.
Definition: NetHost.h:45
i32 m_PlayerID
The player that the given host controls, or -1 if none (observer)
Definition: NetHost.h:48
u8 m_Status
Status - Ready or not: 0 for not ready, 1 for ready, 2 to stay ready.
Definition: NetHost.h:51
int32_t i32
Definition: types.h:34
uint8_t u8
Definition: types.h:37