SDLNet_UDP_Close

Name

SDLNet_UDP_Close -- Shutsdown, disconnects, and closes the UDPsocket sock.

Synopsis

void SDLNet_UDP_Close(UDPsocket sock);

sock A valid UDPsocket. This can be a server or client type socket.

Description

This shutsdown, disconnects, and closes the UDPsocket sock. After this, you can be assured that this socket is not in use anymore. You can reuse the sock variable after this to open a new connection with SDLNet_UDP_Open. Do not try to use any other functions on a closed socket, as it is now invalid.

Return Value

Returns: nothing, this always succeeds.

Example

// unbind all addresses on the UDPsocket channel 0
//UDPsocket udpsock;

SDLNet_UDP_Close(udpsock);
udpsock=NULL; //this helps us know that this UDPsocket is not valid anymore

See Also

SDLNet_UDP_Open, UDPsocket

SDLNet_UDP_Close (last edited 2008-04-17 08:18:56 by localhost)