SDLNet.UDPSocket.receive:
Description:
public int receive (
SDLNet.UDPPacket packet)
Receive a single packet from the UDP socket.
Parameters:
ptr: |
The returned packet contains the source address and the channel it arrived on. If it did not arrive on a bound channel, the the channel will be set to -1. The channels are checked in highest to lowest order, so if an address is bound to multiple channels, the highest channel with the source address bound will be returned.
|
Returns:
This function returns the number of packets read from the network, or -1 on error. This function does not block, so can return 0 packets pending.