Check a socket set for data availability.
Defined in <SDL_net.h>
int SDLNet_CheckSockets(SDLNet_SocketSet set, Uint32 timeout);
SDLNet_SocketSet | set | the socket set to check for ready sockets. |
Uint32 | timeout | the time to wait in milliseconds for new data to arrive. A timeout of zero checks for new data and returns without blocking. |
(int) Returns the number of sockets ready for reading, or -1 if there was an error with the select() system call.
This function checks to see if data is available for reading on the given set of sockets. If 'timeout' is 0, it performs a quick poll, otherwise the function returns when either data is available for reading, or the timeout in milliseconds has elapsed, whichever occurs first.
This function is available since SDL_net 2.0.0.