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


Accept an incoming connection on the given server socket.

Header File

Defined in <SDL_net.h>


TCPsocket SDLNet_TCP_Accept(TCPsocket server);

Function Parameters

TCPsocket server the server socket to accept a connection on.

Return Value

(TCPsocket) Returns the newly created socket, or NULL if there was an error.


server must be a socket returned by SDLNet_TCP_Open with an address of INADDR_NONE or INADDR_ANY (a "server socket"). Other sockets do not accept connections.


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.