C4 Engine
C4 Engine API Documentation

class NetworkMgr

Defined in:  C4Network.h
The Network Manager class.
Definition

class NetworkMgr : public Manager<NetworkMgr>

Member Functions
NetworkMgr::Initialize Initializes the Network Manager.
NetworkMgr::Terminate Terminates the Network Manager.
 
NetworkMgr::GetLocalAddress Returns the network address of the local machine.
NetworkMgr::GetConnectionCount Returns the number of connections that are currently established.
NetworkMgr::GetMaxConnectionCount Returns the maximum number of connections that the Network Manager will allow at one time.
NetworkMgr::SetMaxConnectionCount Sets the maximum number of connections that the Network Manager will allow at one time.
NetworkMgr::GetProtocol Returns the protocol identifier used by the current application.
NetworkMgr::SetProtocol Sets the protocol identifier used by the current application.
NetworkMgr::GetPortNumber Returns the port number on which the local machine will send and receive communications.
NetworkMgr::SetPortNumber Sets the port number on which the local machine will send and receive communications.
NetworkMgr::GetBroadcastPortNumber Returns the port number to which broadcasted messages are sent.
NetworkMgr::SetBroadcastPortNumber Sets the port number to which broadcasted messages are sent.
NetworkMgr::GetReliableResendTime Returns the time interval between reliable packet transmission attempts.
NetworkMgr::SetReliableResendTime Sets the time interval between reliable packet transmission attempts.
NetworkMgr::GetReliableResendCount Returns the time interval between reliable packet transmission attempts.
NetworkMgr::SetReliableResendCount Sets the time interval between reliable packet transmission attempts.
 
NetworkMgr::Connect Attempts to establish a connection with another machine.
NetworkMgr::Disconnect Terminates a connection with another machine.
NetworkMgr::ResolveAddress Looks up the IP address corresponding to a domain name.
 
NetworkMgr::SendReliablePacket Sends a reliable packet to another machine.
NetworkMgr::SendUnreliablePacket Sends an unreliable packet to another machine.
NetworkMgr::SendUnorderedPacket Sends an unordered packet to another machine.
NetworkMgr::SendConnectionlessPacket Sends an unreliable data packet to another machine without establishing a connection.
NetworkMgr::BroadcastPacket Broadcasts a data packet on the LAN.
NetworkMgr::ReceivePacket Retrieves the next available incoming data packet.
 
NetworkMgr::SetNetworkEventCallback Installs a callback function that is called when a network event occurs.
 
NetworkMgr::NetworkTask Called once per application loop to allow the Network Manager to perform internal processing.
Description
The NetworkMgr class encapsulates the low-level networking functionality of the engine. High-level networking functionality is exposed by the MessageMgr class. The single instance of the Network Manager is constructed during an application's initialization and destroyed at termination.

The Network Manager's member functions are accessed through the global pointer TheNetworkMgr.
See Also

NetworkAddress

DomainNameResolver