[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
int SDLNet_AddSocket(SDLNet_SocketSet set, SDLNet_GenericSocket sock)
int SDLNet_TCP_AddSocket(SDLNet_SocketSet set, TCPsocket sock)
int SDLNet_UDP_AddSocket(SDLNet_SocketSet set, UDPsocket sock)
Add a socket to a socket set that will be watched. TCP and UDP sockets should be added using the corrosponding macro (as in SDLNet_TCP_AddSocket
for a TCP socket). The generic socket function will be called by the TCP and UDP macros. Both TCP and UDP sockets may be added to the same socket set. TCP clients and servers may all be in the same socket set. There is no limitation on the sockets in the socket set, other than they have been opened.
Returns: the number of sockets used in the set on success. -1 is returned on errors.
|
See Also:
3.6.1 SDLNet_AllocSocketSet,
3.6.4 SDLNet_DelSocket,
3.6.5 SDLNet_CheckSockets,
4.5 SDLNet_SocketSet,
4.3 UDPsocket,
4.2 TCPsocket