![]() |
• Network Manager | |||||||||||||||||
|
API Links
Developer Links
|
NetworkMgr::SendReliablePacketDefined in:
Sends a reliable packet to another machine.
C4Network.h
Prototype
Parameters
Description
The SendReliablePacket function sends a data packet to the machine whose address is given by the to parameter and listens for an acknowledgement of receipt. The return value is one of the following network result codes.
SendReliablePacket function can be used to send messages to it. Connections are established at the Network Manager level by calling the NetworkMgr::Connect function.When the Network Manager sends a reliable packet, it waits for a return receipt, or acknowledgement, from the receiving machine which confirms the packet's arrival at its destination. If an acknowledgement has not been received after a certain time period, the packet is retransmitted. The Network Manager makes a certain number of attempts before a connection is considered to have timed out. The number of attempts and the time interval between those attempts can be set using the NetworkMgr::SetReliableResendCount and NetworkMgr::SetReliableResendTime functions.When a connection times out because a reliable packet was not acknowledged, the Network Manager calls the currently installed network event procedure, if any, and then disconnects from the machine that timed out. The low-level network event procedure can be set using the NetworkMgr::SetNetworkEventProc function, but this procedure should not be changed if the Message Manager is being used. Instead, the Message Manager will call the Application::HandleConnectionEvent function when a connection times out.Packet data is encrypted before it is transmitted. See Also
NetworkAddress
NetworkMgr::SendUnreliablePacket
NetworkMgr::SendUnorderedPacket
NetworkMgr::SendConnectionlessPacket
NetworkMgr::BroadcastPacket
NetworkMgr::ReceivePacket
NetworkMgr::Connect
NetworkMgr::SetReliableResendCount
NetworkMgr::SetReliableResendTime
Application::HandleConnectionEvent
|