Article View: borland.public.cppbuilder.internet.socket
Article #937Re: timeout of recv
From: Eduardo Jauch
Date: Sun, 01 Jul 2007 09:22
Date: Sun, 01 Jul 2007 09:22
31 lines
2101 bytes
2101 bytes
Bob Gonder escreveu: > Eduardo Jauch wrote: > > > So, are you using the Windows API <winsock2.h> ? Yep! :) > > setsockopt() with SO_RCVTIMEO > > 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". > Hum... So, my program is "Blocked"... The big problem seens to be when the "internet connection" fail (like a fault by the telecom provider) or when the site go off (when it's on maintenance). When this event's occour, the program "freeze"... But I think that this can be a problem of my code... I'm doing a few modifications and when it's ok, I'll do some tests and tell if this continue happening... I'll see the function. It works with block programs? Thanks!
Technical Details
Message-ID:
<46877265$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<46869b18$1@newsgroups.borland.com> <46869fb5$1@newsgroups.borland.com> <4686a522$1@newsgroups.borland.com> <ernd83tq9ihts1k8r14bfv2kdjbnf9ipib@4ax.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 Date: Sun, 01 Jul 2007 06:22:48 -0300 From: Eduardo Jauch <eduardo.jauch@gmail.com> User-Agent: Thunderbird 1.5.0.12 (Windows/20070509) MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.internet.socket Subject: Re: timeout of recv References: <46869b18$1@newsgroups.borland.com> <46869fb5$1@newsgroups.borland.com> <4686a522$1@newsgroups.borland.com> <ernd83tq9ihts1k8r14bfv2kdjbnf9ipib@4ax.com> In-Reply-To: <ernd83tq9ihts1k8r14bfv2kdjbnf9ipib@4ax.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 201.25.165.121 Message-ID: <46877265$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1183281765 201.25.165.121 (1 Jul 2007 02:22:45 -0700) Lines: 32 Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail X-Original-Bytes: 1958