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


Open a client TCP network socket.

Header File

Defined in <SDL_net.h>


TCPsocket SDLNet_TCP_OpenClient(IPaddress *ip);

Function Parameters

IPaddress * ip The address to open a connection to.

Return Value

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


Attempt a TCP connection to the remote host and port. 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.

See Also

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.