🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: timeout of recv

#938
From: Eduardo Jauch
Date: Sun, 01 Jul 2007 09:23
17 lines
1373 bytes
Colin B Maharaj escreveu:
> 
> 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));
> 
> 

This will work with block programs?

I usually use recv and wait until it returns...

Thanks!
Technical Details
Message-ID: <46877297@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.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
References: <46869b18$1@newsgroups.borland.com> <468715f2@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: Sun, 01 Jul 2007 06:23:38 -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> <468715f2@newsgroups.borland.com>
In-Reply-To: <468715f2@newsgroups.borland.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 201.25.165.121
Message-ID: <46877297@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1183281815 201.25.165.121 (1 Jul 2007 02:23:35 -0700)
Lines: 17
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.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: 1228