NetworkMgr::BroadcastPacket
Defined in:
Broadcasts a data packet on the LAN.
C4Network.h
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
NetworkResult BroadcastPacket(uint32 size, const void *data);
Parameters
size |
The size of the data packet. This value may not exceed the maximum size given by the constant kMaxMessageSize .
|
data |
A pointer to the data to be sent. |
Description
The BroadcastPacket
function broadcasts a connectionless data packet to the local area network. The return value is one of the following network result codes.
kNetworkOkay |
The packet was successfully queued for transmission. |
kNetworkPacketTooLarge |
The packet could not be sent because its size exceeds kMaxMessageSize .
|
kNetworkBufferFull |
The packet could not be sent because the outgoing packet buffers are full. Try sending the packet again at a later time. |
Broadcasted packets are sent to the broadcast port number, which can be set using the
NetworkMgr::SetBroadcastPortNumber
function.Packet data is encrypted before it is transmitted.
See Also
NetworkMgr::GetBroadcastPortNumber
NetworkMgr::SetBroadcastPortNumber
NetworkMgr::SendReliablePacket
NetworkMgr::SendUnreliablePacket
NetworkMgr::SendUnorderedPacket