INetwork

Main access point for creating Network objects. More...

#include

Public Types

enum ENetwork_Multithreading_Mode { NETWORK_MT_OFF = 0, NETWORK_MT_PRIORITY_NORMAL, NETWORK_MT_PRIORITY_HIGH }
enum ENetContextCreationFlags { eNCCF_Multiplayer = BIT(0) }

Public Member Functions

virtual bool IsPbInstalled ()=0
virtual void SetNetGameInfo (SNetGameInfo)=0
virtual SNetGameInfo GetNetGameInfo ()=0
virtual IRemoteControlSystem * GetRemoteControlSystemSingleton ()=0
Retrieves RCON system interface.
virtual ISimpleHttpServer * GetSimpleHttpServerSingleton ()=0
Retrieves HTTP server interface.
virtual void FastShutdown ()=0
Disconnects everything before fast shutdown.
virtual void SetMultithreadingMode (ENetwork_Multithreading_Mode threadMode)=0
Enables/disables multi threading.
virtual INetworkServicePtr GetService (const char *name)=0
Initializes some optional service.
virtual INetNub * CreateNub (const char *address, IGameNub *pGameNub, IGameSecurity *pSecurity, IGameQuery *pGameQuery)=0
virtual ILanQueryListener * CreateLanQueryListener (IGameQueryListener *pGameQueryListener)=0
virtual INetContext * CreateNetContext (IGameContext *pGameContext, uint32 flags)=0
Creates a server context with an associated game context.
virtual void Release ()=0
Releases the interface (and delete the object that implements it).
virtual void GetMemoryStatistics (ICrySizer *pSizer)=0
Gathers memory statistics for the network module.
virtual void GetBandwidthStatistics (SBandwidthStats *const pStats)=0
Gets the socket level bandwidth statistics.
virtual void GetPerformanceStatistics (SNetworkPerformance *pSizer)=0
Gathers performance statistics for the network module.
virtual void GetProfilingStatistics (SNetworkProfilingStats *const pStats)=0
Gets debug and profiling statistics from network members.
virtual void SyncWithGame (ENetworkGameSync syncType)=0
virtual const char * GetHostName ()=0
Gets the local host name.
virtual void SetCDKey (const char *)=0
Sets CD key string for online validation.
virtual bool HasNetworkConnectivity ()=0
virtual bool PbConsoleCommand (const char *, int length)=0
EvenBalance.
virtual void PbCaptureConsoleLog (const char *output, int length)=0
EvenBalance.
virtual void PbServerAutoComplete (const char *, int length)=0
EvenBalance.
virtual void PbClientAutoComplete (const char *, int length)=0
EvenBalance.
virtual bool IsPbSvEnabled ()=0
virtual void StartupPunkBuster (bool server)=0
virtual void CleanupPunkBuster ()=0
virtual bool IsPbClEnabled ()=0
virtual ICryLobby * GetLobby ()=0
virtual void NpCountReadBits (bool count)=0
virtual bool NpGetChildFromCurrent (const char *name, SNetProfileStackEntry **entry, bool rmi)=0
virtual void NpRegisterBeginCall (const char *name, SNetProfileStackEntry **entry, float budge, bool rmi)=0
virtual void NpBeginFunction (SNetProfileStackEntry *entry, bool read)=0
virtual void NpEndFunction ()=0
virtual bool NpIsInitialised ()=0
virtual SNetProfileStackEntry * NpGetNullProfile ()=0
virtual void EnableHostMigration (bool bEnabled)=0
virtual bool IsHostMigrationEnabled (void)=0
virtual void TerminateHostMigration (CrySessionHandle gh)=0
virtual void AddHostMigrationEventListener (IHostMigrationEventListener *pListener, const char *pWho, EListenerPriorityType priority)=0
virtual void RemoveHostMigrationEventListener (IHostMigrationEventListener *pListener)=0
virtual void EncryptBuffer (uint8 *pOutput, const uint8 *pInput, uint32 bufferLength, const uint8 *pKey, uint32 keyLength)=0
virtual void DecryptBuffer (uint8 *pOutput, const uint8 *pInput, uint32 bufferLength, const uint8 *pKey, uint32 keyLength)=0
virtual void EncryptBuffer (TCipher cipher, uint8 *pOutput, const uint8 *pInput, uint32 bufferLength)=0
virtual void DecryptBuffer (TCipher cipher, uint8 *pOutput, const uint8 *pInput, uint32 bufferLength)=0
virtual uint32 RijndaelEncryptBuffer (uint8 *pOutput, const uint8 *pInput, uint32 bufferLength, const uint8 *pKey, uint32 keyLength)=0
Rijndael encrypts/decrypts in 16 byte blocks so the return value the number of bytes encrypted/decrypted will be less than bufferLength if bufferLength isn't a multiple of 16.
virtual uint32 RijndaelDecryptBuffer (uint8 *pOutput, const uint8 *pInput, uint32 bufferLength, const uint8 *pKey, uint32 keyLength)=0
virtual TCipher BeginCipher (const uint8 *pKey, uint32 keyLength)=0
virtual void Encrypt (TCipher cipher, uint8 *pOutput, const uint8 *pInput, uint32 bufferLength)=0
virtual void Decrypt (TCipher cipher, uint8 *pOutput, const uint8 *pInput, uint32 bufferLength)=0
virtual void EndCipher (TCipher cipher)=0

Detailed Description

Main access point for creating Network objects.

Member Function Documentation

◆ CreateLanQueryListener()

virtual ILanQueryListener* INetwork::CreateLanQueryListener ( IGameQueryListener * pGameQueryListener)
pure virtual

Queries the local network for games that are running.

Parameters
pGameQueryListenerGame half of the query listener, must be non-null (will be released by INetQueryListener).
Returns
Pointer to the new INetQueryListener, or NULL on failure.

◆ CreateNub()

virtual INetNub* INetwork::CreateNub ( const char * address,
IGameNub * pGameNub,
IGameSecurity * pSecurity,
IGameQuery * pGameQuery
)
pure virtual

Allocates a nub for communication with another computer.

Parameters
addressSpecify an address for the nub to open, or NULL.
pGameNubGame half of this nub, must be non-null (will be released by the INetNub).
pSecuritySecurity callback interface (for banning/unbanning ip's, etc, can be null).
pGameQueryInterface for querying information about the nub (for server snooping, etc, can be null).
Returns
Pointer to the new INetNub, or NULL on failure.

◆ EncryptBuffer()

virtual void INetwork::EncryptBuffer ( TCipher cipher,
uint8 * pOutput,
const uint8 * pInput,
uint32 bufferLength
)
pure virtual

When doing block encryption on many buffers with the same key it is much more efficient to create a cipher with BeginCipher, then call the following functions as many times as needed before calling EndCipher to free the cipher.

◆ SyncWithGame()

virtual void INetwork::SyncWithGame ( ENetworkGameSync syncType)
pure virtual

Updates all nubs and contexts.

Parameters
blockingTime to block for network input (zero to not block).