Open a server TCP network socket.
Defined in <SDL_net.h>
TCPsocket SDLNet_TCP_OpenServer(IPaddress *ip);
IPaddress * | ip | The address to host a server on. |
(TCPsocket) Returns the newly created socket, or NULL if there was an error.
If ip->host
is INADDR_NONE or INADDR_ANY, the socket is bound to all interfaces, otherwise it is bound to the specified interface. The address passed in should already be swapped to network byte order (addresses returned from SDLNet_ResolveHost() are already in the correct form).
This function is available since SDL_net 2.4.0.