Is there a timeout on recv

416 views
Skip to first unread message

ezmora

unread,
Nov 20, 2011, 9:15:09 AM11/20/11
to android-ndk
I received code which uses sockets to communicate with a remote
server. (#include <sys/socket.h>)

I saw cases where if the server does not respond within ~5 seconds,
the code timeouts, so that recv() returns 0 and errno is 0.
Is there a timeout on recv? If so, how can I modify it?

Thanks,
Eyal

g...@novadsp.com

unread,
Nov 20, 2011, 9:25:18 AM11/20/11
to andro...@googlegroups.com
google setsockopt

ezmora

unread,
Nov 20, 2011, 5:29:19 PM11/20/11
to android-ndk
Thanks.

Is there a default value in case setsockopt is not used?

> > Eyal- Hide quoted text -
>
> - Show quoted text -

Carlos A. M. dos Santos

unread,
Nov 22, 2011, 6:32:51 AM11/22/11
to andro...@googlegroups.com
On Sun, Nov 20, 2011 at 8:29 PM, ezmora <eyal...@gmail.com> wrote:
> Thanks.
>
> Is there a default value in case setsockopt is not used?

15 minutes, IIRC

Reply all
Reply to author
Forward
0 new messages