struct INetwork { enum ENetwork_Multithreading_Mode { NETWORK_MT_OFF = 0, NETWORK_MT_PRIORITY_NORMAL, NETWORK_MT_PRIORITY_HIGH }; enum ENetContextCreationFlags { eNCCF_Multiplayer = BIT(0) }; };
INetwork.h
Main access point for creating Network objects.
enum ENetContextCreationFlags { eNCCF_Multiplayer = BIT(0) };
INetwork.h
enum ENetwork_Multithreading_Mode { NETWORK_MT_OFF = 0, NETWORK_MT_PRIORITY_NORMAL, NETWORK_MT_PRIORITY_HIGH };
INetwork.h
virtual ~INetwork();
virtual void AddHostMigrationEventListener(IHostMigrationEventListener* pListener, const char* pWho, EListenerPriorityType priority) = 0;
virtual void AddRebroadcasterConnection(INetChannel* pChannel, TNetChannelID channelID) = 0;
AddRebroadcasterConnection Adds a connection to the rebroadcaster mesh pChannel - pointer to the channel being added channelID - game side channel ID associated with pChannel (if known)
virtual TCipher BeginCipher(const uint8* pKey, uint32 keyLength) = 0;
Streamed encryption
virtual void CleanupPunkBuster() = 0;
virtual ILanQueryListener * CreateLanQueryListener(IGameQueryListener * pGameQueryListener) = 0;
Parameters |
Description |
IGameQueryListener * pGameQueryListener |
the game half of the query listener, must be non-null (will be released by INetQueryListener). |
Return |
Pointer to the new INetQueryListener, or NULL on failure. |
Queries the local network for games that are running.
virtual INetContext * CreateNetContext(IGameContext * pGameContext, uint32 flags) = 0;
Creates a server context with an associated game context.
virtual INetNub * CreateNub(const char * address, IGameNub * pGameNub, IGameSecurity * pSecurity, IGameQuery * pGameQuery) = 0;
Parameters |
Description |
const char * address |
specify an address for the nub to open, or NULL. |
IGameNub * pGameNub |
the game half of this nub, must be non-null (will be released by the INetNub). |
IGameSecurity * pSecurity |
security callback interface (for banning/unbanning ip's, etc, can be null). |
IGameQuery * pGameQuery |
interface for querying information about the nub (for server snooping, etc, can be null). |
Return |
Pointer to the new INetNub, or NULL on failure. |
Allocates a nub for communication with another computer.
virtual void Decrypt(TCipher cipher, uint8* pOutput, const uint8* pInput, uint32 bufferLength) = 0;
virtual void DecryptBuffer(TCipher cipher, uint8* pOutput, const uint8* pInput, uint32 bufferLength) = 0;
virtual void DecryptBuffer(uint8* pOutput, const uint8* pInput, uint32 bufferLength, const uint8* pKey, uint32 keyLength) = 0;
virtual void EnableHostMigration(bool bEnabled) = 0;
Host Migration
virtual void Encrypt(TCipher cipher, uint8* pOutput, const uint8* pInput, uint32 bufferLength) = 0;
virtual void EncryptBuffer(TCipher cipher, uint8* pOutput, const uint8* pInput, uint32 bufferLength) = 0;
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.
virtual void EncryptBuffer(uint8* pOutput, const uint8* pInput, uint32 bufferLength, const uint8* pKey, uint32 keyLength) = 0;
Expose Encryption to game Block encryption
virtual void EndCipher(TCipher cipher) = 0;
virtual void FastShutdown() = 0;
Disconnects everything before fast shutdown.
virtual void GetBandwidthStatistics(SBandwidthStats* const pStats) = 0;
Gets the socket level bandwidth statistics
virtual const char * GetHostName() = 0;
Gets the local host name.
virtual ICryLobby* GetLobby() = 0;
virtual void GetMemoryStatistics(ICrySizer * pSizer) = 0;
Gathers memory statistics for the network module.
virtual SNetGameInfo GetNetGameInfo() = 0;
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 IRemoteControlSystem* GetRemoteControlSystemSingleton() = 0;
Retrieves RCON system interface.
virtual INetworkServicePtr GetService(const char * name) = 0;
Initializes some optional service.
virtual ISimpleHttpServer* GetSimpleHttpServerSingleton() = 0;
Retrieves HTTP server interface.
virtual bool HasNetworkConnectivity() = 0;
virtual bool IsHostMigrationEnabled() = 0;
virtual bool IsPbClEnabled() = 0;
virtual bool IsPbInstalled() = 0;
virtual bool IsPbSvEnabled() = 0;
virtual bool IsRebroadcasterEnabled() const = 0;
IsRebroadcasterEnabled Informs the caller if the rebroadcaster is enabled or not
virtual void NpBeginFunction(SNetProfileStackEntry* entry, bool read) = 0;
virtual void NpCountReadBits(bool count) = 0;
virtual void NpEndFunction() = 0;
virtual bool NpGetChildFromCurrent(const char * name, SNetProfileStackEntry ** entry, bool rmi) = 0;
virtual SNetProfileStackEntry* NpGetNullProfile() = 0;
virtual bool NpIsInitialised() = 0;
virtual void NpRegisterBeginCall(const char * name, SNetProfileStackEntry** entry, float budge, bool rmi) = 0;
virtual void PbCaptureConsoleLog(const char* output, int length) = 0;
EvenBalance - M. Quinn
virtual void PbClientAutoComplete(const char*, int length) = 0;
EvenBalance - M. Quinn
virtual bool PbConsoleCommand(const char*, int length) = 0;
EvenBalance - M. Quinn
virtual void PbServerAutoComplete(const char*, int length) = 0;
EvenBalance - M. Quinn
virtual void Release() = 0;
Releases the interface (and delete the object that implements it).
virtual void RemoveHostMigrationEventListener(IHostMigrationEventListener* pListener) = 0;
virtual uint32 RijndaelDecryptBuffer(uint8* pOutput, const uint8* pInput, uint32 bufferLength, const uint8* pKey, uint32 keyLength) = 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 void SetCDKey(const char*) = 0;
Sets CD key string for online validation.
virtual void SetMultithreadingMode(ENetwork_Multithreading_Mode threadMode) = 0;
Enables/disables multi threading.
virtual void SetNetGameInfo(SNetGameInfo) = 0;
virtual void StartupPunkBuster(bool server) = 0;
virtual void SyncWithGame(ENetworkGameSync syncType) = 0;
Parameters |
Description |
blocking |
time to block for network input (zero to not block). |
Updates all nubs and contexts.
virtual void TerminateHostMigration(CrySessionHandle gh) = 0;