🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Hangs on socket read, despite timeout & antifreeze

#2648
From: Remy Lebeau (TeamB)
Date: Sat, 04 Mar 2006 01:42
22 lines
1546 bytes
"DWilkinson" <dennis.c.wilkinson@boeing.com> wrote in message
news:4408c710$1@newsgroups.borland.com...

> My program is hanging on a socket read (
...IdTCPClient1->Socket->Recv(msg, 600); )

You should not be calling Recv() directly.  Use the TIdTCPClient's own
ReadBuffer() method instead:

    IdTCPClient1->ReadBuffer(msg, 600);

Timeouts are handled at a higher level, but you are trying to access a
lower-level method.

> despite having set the Readtimeout

Recv() is not subject to the ReadTimeout.  That is why you should not be
calling the IOHandler's reading methods directly.


Gambit
Technical Details
Message-ID: <4408f04d$3@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news3.google.com!news2.volia.net!news.germany.com!newsfeed.freenet.de!newsfeed.inode.at!reader.uucp.at!newsfeed.uucp.at!news.uucp.at!newsgroups.borland.com!not-for-mail
References: <4408c710$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,78f66e549d65ce51
X-Google-Attributes: gid11508e,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com>
Newsgroups: borland.public.cppbuilder.internet.socket
References: <4408c710$1@newsgroups.borland.com>
Subject: Re: Hangs on socket read, despite timeout & antifreeze
Date: Fri, 3 Mar 2006 17:42:35 -0800
Lines: 24
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
NNTP-Posting-Host: 68.69.17.41
Message-ID: <4408f04d$3@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1141436493 68.69.17.41 (3 Mar 2006 17:41:33 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news3.google.com!news2.volia.net!news.germany.com!newsfeed.freenet.de!newsfeed.inode.at!reader.uucp.at!newsfeed.uucp.at!news.uucp.at!newsgroups.borland.com!not-for-mail