[SDL] How to know when SDLNet_TCP_Recv has no more data available, or how to specify timeout for it?
Brian
brian.ripoff at gmail.com
Mon Oct 8 01:18:18 PDT 2007
How about checking if there *is* data available before calling
SDLNet_TCP_Recv. Try creating a SDLNet_SocketSet and using the
functions SDLNet_CheckSockets and SDLNet_SocketReady.
On 08/10/2007, DARKGuy . <dark.guy.2008 at gmail.com> wrote:
> Yeah, is there a way to specify a timeout for SDLNet_TCP_Recv, or how to
> know when there's no more data, so SDLNet_TCP_Recv doesn't stay waiting for
> data to arrive? I'm thinking in using SDL threads, but I'm still not sure
> how do I apply them in my case...
>
> I've also tried to search in google but I haven't found any info about
> applying a timeout either by SDL_Net or by threads...
>
> Any help is greatly appreciated! :D
>
> - DARKGuy
>
> _______________________________________________
> SDL mailing list
> SDL at lists.libsdl.org
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
>
>
More information about the SDL
mailing list