Article View: borland.public.cppbuilder.internet.socket
Article #935Re: timeout of recv
From: Colin B Maharaj
Date: Sun, 01 Jul 2007 02:48
Date: Sun, 01 Jul 2007 02:48
24 lines
1533 bytes
1533 bytes
What you want will probably look something like this...... struct timeval timeo; timeo.tv_sec = 1; timeo.tv_usec = 0; int ret = setsockopt(sockfd, SOL_SOCKET, SO_RCVTIMEO, &timeo, sizeof(timeo)); Eduardo Jauch wrote: > Hello! > > My modem have some "problems", and eventually, he turns a "Timeout" > message when I try to access any page. > > 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? > > > Thanks!
Technical Details
Message-ID:
<468715f2@newsgroups.borland.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-mailReferences:
<46869b18$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 Date: Sat, 30 Jun 2007 22:48:22 -0400 From: Colin B Maharaj <noreply@myhost.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> In-Reply-To: <46869b18$1@newsgroups.borland.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Antivirus: avast! (VPS 000752-7, 07/01/2007), Outbound message X-Antivirus-Status: Clean NNTP-Posting-Host: 190.58.14.110 Message-ID: <468715f2@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1183258098 190.58.14.110 (30 Jun 2007 19:48:18 -0700) Lines: 24 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