🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.socket
Article #936

Re: timeout of recv

#936
From: Bob Gonder
Date: Sat, 30 Jun 2007 23:13
21 lines
1807 bytes
Eduardo Jauch wrote:

>>> I have an aplication that use send and recv to access a page, and when 
>>> this happens, the recv don't "return".
>>>
>>> How to adjust the timeout of recv? There's a way to do this?

So, are you using the Windows API  <winsock2.h> ?

	setsockopt()  with  SO_RCVTIMEO

>> I use non-block sockets... So, looks I can't use select... right?
>A litle correction...
>I don't know if my application is "non-block" (because I allways am 
>confused about this... rsrsrs)

If your program calls recv and expects the data to be there at the end of the call, then
it is "blocked" at that point.
If your program calls WSARecv with the Overlapped options set, and continues on doing
other things, hoping someday the data will arrive and be handled by the OverlapedRoutine,
then it is "non-blocking".
Technical Details
Message-ID: <ernd83tq9ihts1k8r14bfv2kdjbnf9ipib@4ax.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <46869b18$1@newsgroups.borland.com> <46869fb5$1@newsgroups.borland.com> <4686a522$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,76bc0c5b0ec153e0
X-Google-Attributes: gid11508e,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: Bob Gonder <notbg@notmindspring.invalid>
Newsgroups: borland.public.cppbuilder.internet.socket
Subject: Re: timeout of recv
Date: Sat, 30 Jun 2007 16:13:54 -0700
Organization: MindSpring Enterprises, Inc.
Reply-To: notbg@notmindspring.invalid
Message-ID: <ernd83tq9ihts1k8r14bfv2kdjbnf9ipib@4ax.com>
References: <46869b18$1@newsgroups.borland.com> <46869fb5$1@newsgroups.borland.com> <4686a522$1@newsgroups.borland.com>
X-Newsreader: Forte Agent 1.93/32.576 English (American)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 69.69.91.28
X-Trace: newsgroups.borland.com 1183245231 69.69.91.28 (30 Jun 2007 16:13:51 -0700)
Lines: 23
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail