Pyrogenesis  13997
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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
 

Detailed Description

Definition at line 65 of file NetHost.h.

Member Function Documentation

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

Construct an ENet packet by serialising the given message.

Returns
NULL on failure

Definition at line 49 of file NetHost.cpp.

void CNetHost::Deinitialize ( )
static

Deinitialize ENet.

Definition at line 76 of file NetHost.cpp.

void CNetHost::Initialize ( )
static

Initialize ENet.

This must be called before any other networking code.

Definition at line 70 of file NetHost.cpp.

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

Definition at line 26 of file NetHost.cpp.

Member Data Documentation

const int CNetHost::DEFAULT_CHANNEL = 0
static

Definition at line 68 of file NetHost.h.


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