SDL Wiki
(This function is part of SDL_net, a separate library from SDL.)


Close a TCP network socket.

Header File

Defined in <SDL_net.h>


void SDLNet_TCP_Close(TCPsocket sock);

Function Parameters

TCPsocket sock socket to close.


All TCP sockets (server and non-server) are deinitialized through this function. Call this once you are done with a socket, and assume the handle is invalid once you have.

Closing a socket will disconnect any communication and free its resources.


This function is available since SDL_net 2.0.0.

CategoryAPI, CategoryAPIFunction

[ edit | delete | history | feedback | raw ]

[ front page | index | search | recent changes | git repo | offline html ]

All wiki content is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0).
Wiki powered by ghwikipp.