Tao.Sdl SDK Documentation

SdlNet.SDLNet_UDP_Close Method 

Close and free a UDP socket

[Visual Basic]
Public Shared Sub SDLNet_UDP_Close( _
   ByVal sock As IntPtr _
)
[C#]
public static void SDLNet_UDP_Close(
   IntPtr sock
);

Parameters

sock
A valid UDPsocket to shutdown, close, and free.

Return Value

nothing, this always succeeds.

Remarks

Shutdown, close, and free a UDPsocket. Don't use the UDPsocket after calling this, except to open a new one.

Binds to C-function call in SDL_net.h:

            extern DECLSPEC void SDLCALL SDLNet_UDP_Close(UDPsocket sock)
            

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 Class | Tao.Sdl Namespace | SDLNet_UDP_Open | SdlNet.UDPsocket