C4 Engine
C4 Engine API Documentation

NetworkMgr::Terminate

Defined in:  C4Network.h
Terminates the Network Manager.
NOTE. This is a low-level function that is normally called exclusively by the Message Manager. Calling this function directly is not recommended if the Message Manager is being used.
Prototype

void Terminate(void);

Description
The Terminate function terminates all communications and releases any resources allocated by the underlying TCP/IP implementation. If the Network Manager has not been initialized at the time when Terminate is called, then this function has no effect—duplicate calls to Terminate are harmless.
Special Considerations
After disconnecting from remote machines, a small amount of time should be allowed to pass before terminating the Network Manager. This is to allow enough time for the communications necessary for an orderly disconnection to occur. The number of connections to the local machine can be monitored by calling the NetworkMgr::GetConnectionCount function. When the connection count becomes zero, it is safe to terminate the Network Manager.
See Also

NetworkMgr::Initialize

NetworkMgr::GetConnectionCount

MessageMgr::BeginSinglePlayerGame