Pyrogenesis  trunk
Static Public Member Functions | Static Public Attributes | List of all members
CNetHost Class Reference

#include <NetHost.h>

Static Public Member Functions

static bool SendMessage (const CNetMessage *message, ENetPeer *peer, const char *peerName)
 Transmit a message to the given peer. More...
 
static ENetPacketCreatePacket (const CNetMessage *message)
 Construct an ENet packet by serialising the given message. More...
 
static void Initialize ()
 Initialize ENet. More...
 
static void Deinitialize ()
 Deinitialize ENet. More...
 

Static Public Attributes

static const int DEFAULT_CHANNEL = 0
 

Member Function Documentation

◆ CreatePacket()

ENetPacket * CNetHost::CreatePacket ( const CNetMessage message)
static

Construct an ENet packet by serialising the given message.

Returns
NULL on failure

◆ Deinitialize()

void CNetHost::Deinitialize ( )
static

Deinitialize ENet.

◆ Initialize()

void CNetHost::Initialize ( )
static

Initialize ENet.

This must be called before any other networking code.

◆ SendMessage()

bool CNetHost::SendMessage ( const CNetMessage message,
ENetPeer peer,
const char *  peerName 
)
static

Transmit a message to the given peer.

Parameters
messagemessage to send
peerpeer to send to
peerNamename of peer for debug logs
Returns
true on success, false on failure

Member Data Documentation

◆ DEFAULT_CHANNEL

const int CNetHost::DEFAULT_CHANNEL = 0
static

The documentation for this class was generated from the following files: