🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Inactivity timeouts in sockets?

#2476
From: Martin
Date: Tue, 28 Mar 2006 19:34
50 lines
2747 bytes
Remy Lebeau (TeamB) wrote:
> "Martin" <dev@no.comppromed.spam.com> wrote in message
> news:44285053$1@newsgroups.borland.com...
> 
> 
>>I don't think I'm leaving anything in the input
>>buffer. Here's the OnRead event:
> 
> 
> You should be calling ReceiveLength() before calling ReceiveBuf()

Why? I can see that it would limit the amount of 
data read to the current incoming amount, but the 
underlying socket in windows should take care of 
any buffering stuff and the message queues.

> Are you sure that you are not filling the buffer beyond its capacity,
> overriding the surrounding memory?

No, it's not overwriting the surrounding memory. 
And the buffer is much bigger than the incoming 
packets.

> Did you verify that the sending application is actually sending its data
> without errors?

Yes. During the timeframe where it's not working, 
they're sending and resending, but no response 
from us.

> Also, non-blocking sockets rely on the message queue, so are you blocking
> the queue at any time from processing new messages?

No. The other sockets still work during this time. 
As does the rest of the application.

> Are there are firewalls or routers in between your application and the
> sending application, which might be blocking the data?

No. Both apps are on a LAN (same subnet), and I 
don't see how a "reboot" would clear a block from 
any router they may have. There is not a firewall 
running on our side.

When it happened last night, I did not get any of 
the auditing statements from the read event. So 
either no events happened or the underlying recv() 
calls always returned 0.

Marty
Technical Details
Message-ID: <44298fd1$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news4.google.com!news2.volia.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <44281b29$1@newsgroups.borland.com> <44282b0d$1@newsgroups.borland.com> <44285053$1@newsgroups.borland.com> <44287752$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,11a7fa37087eb9c
X-Google-Attributes: gid11508e,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Tue, 28 Mar 2006 11:34:41 -0800
From: Martin <dev@no.comppromed.spam.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.11) Gecko/20050728
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.internet.socket
Subject: Re: Inactivity timeouts in sockets?
References: <44281b29$1@newsgroups.borland.com> <44282b0d$1@newsgroups.borland.com> <44285053$1@newsgroups.borland.com> <44287752$1@newsgroups.borland.com>
In-Reply-To: <44287752$1@newsgroups.borland.com>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 209.204.181.224
Message-ID: <44298fd1$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1143574481 209.204.181.224 (28 Mar 2006 11:34:41 -0700)
Lines: 50
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news4.google.com!news2.volia.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail