[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
int SDLNet_UDP_Bind(UDPsocket sock, int channel, IPaddress *address)
Bind an address to a channel on a socket.
Incoming packets are only allowed from bound addresses for the socket channel.
All outgoing packets on that channel, regardless of the packets internal address, will attempt to send once on each bound address on that channel.
You may assign up to SDLNET_MAX_UDPADDRESSES to each channel.
Returns: The channel number that was bound. -1 is returned on errors, such as no free channels, or this channel has SDLNET_MAX_UDPADDRESSES already assigned to it, or you have used a channel higher or equal to SDLNET_MAX_UDPCHANNELS, or lower than -1.
|
See Also:
3.4.4 SDLNet_UDP_Unbind,
3.4.5 SDLNet_UDP_GetPeerAddress,
3.4.1 SDLNet_UDP_Open,
4.1 IPaddress,
4.3 UDPsocket