Tao.Sdl SDK Documentation |
|
SdlNet.SDLNet_TCP_Close Method
Close a TCP socket
[Visual Basic]
Public Shared Sub SDLNet_TCP_Close( _
ByVal
sock As
IntPtr _
)
[C#]
public static
void SDLNet_TCP_Close(
IntPtr sock);
Parameters
-
sock
- A valid TCPsocket. This can be a server or client type socket.
Return Value
nothing, this always succeeds for all we need to know.
Remarks
This shutsdown, disconnects, and closes the TCPsocket 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_TCP_Open. Do not try to use any other functions on a closed socket, as it is now invalid.
Binds to C-function call in SDL_net.h:
extern DECLSPEC void SDLCALL SDLNet_TCP_Close(TCPsocket sock)
Example
// close the connection on sock
//TCPsocket sock;
SDLNet_TCP_Close(sock);
See Also
SdlNet Class | Tao.Sdl Namespace | SDLNet_TCP_Close | SdlNet.TCPsocket