🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: TServerSocket SendText Exception

#2391
From: Remy Lebeau (TeamB)
Date: Fri, 21 Apr 2006 16:42
38 lines
2976 bytes
"Eric Patterson" <eric.patterson@bepco.com> wrote in message
news:4448c637$1@newsgroups.borland.com...

> That exception has gone away and since in this process of finding
. my problems I removed clearing the errorcode integer on a Socket
> OnError event, I came in this morning with an asynchronous socket
> error 10053 which I already know is what the socket throws back
> to me when it is full and busy.

10053 is an abnormal disconnect.  The socket forced itself to disconnect due
to an internal error.  That can happen for a number of reasons.  Being "full
and busy" is not likely to be the cause.  If the socket's internal buffer
were simply full and couldn't accept more data yet, you would either get
WSAENOBUFS as the ErrorCode in the OnError event, or you would not get the
OnError event at all if WSAGetLastError() returns WSAEWOULDBLOCK, which the
VCL handles internally.

> I would of expected this error soon after starting the app but it
> didn't occur until 5 hours later.

If you were filling up the socket's internal buffer after several hours,
then that suggests to me that you are trying to send data faster than the
socket can send it out, and the buffer slowly fills up over time. As I
explained to you earler, if the socket reports WSAEWOULDBLOCK on a sent
operation, then you *must* wait for the OnWrite event to be triggered before
you can send more data.  If your application needs to send data before that
happens, then you will just have to queue the data for later.

> I will make the additions now that when I see a 10053 in the OnError
> event to wait for a ClientWrite Event to occur before continuing on;
> like we have discussed before.

That is the wrong use of the OnWrite event.  10053 is a fatal error.  The
connection is gone.  You have to reconect.


Gambit
Technical Details
Message-ID: <44490c3a$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news3.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <44439c71$1@newsgroups.borland.com> <4443ca2a$1@newsgroups.borland.com> <4447a6f6$1@newsgroups.borland.com> <4447b917$3@newsgroups.borland.com> <4447c0b0$1@newsgroups.borland.com> <4mkf429644ao82ak653gcltqtf4v2g698j@4ax.com> <4447d8b4$1@newsgroups.borland.com> <44480b3f$1@newsgroups.borland.com> <4448c637$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,fea0b13af0f4efa8
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: <44439c71$1@newsgroups.borland.com> <4443ca2a$1@newsgroups.borland.com> <4447a6f6$1@newsgroups.borland.com> <4447b917$3@newsgroups.borland.com> <4447c0b0$1@newsgroups.borland.com> <4mkf429644ao82ak653gcltqtf4v2g698j@4ax.com> <4447d8b4$1@newsgroups.borland.com> <44480b3f$1@newsgroups.borland.com> <4448c637$1@newsgroups.borland.com>
Subject: Re: TServerSocket SendText Exception
Date: Fri, 21 Apr 2006 09:42:56 -0700
Lines: 40
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: <44490c3a$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1145637946 68.69.17.41 (21 Apr 2006 09:45:46 -0700)
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news3.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail