🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: TServerSocket SendText Exception

#2470
From: Eric Patterson
Date: Mon, 17 Apr 2006 18:07
43 lines
2843 bytes
Thanks for the insight.  I understand what you mean but can't find an 
example on the newsgroup to help.  So I should continue to call SentText 
until it returns a value of ???.  I would think zero but it does state that 
the return value can be less then zero also.  What values less then zero can 
be returned and what do they mean?  Should an OnError event be written since 
I will continue to SendText until it goes through?  Since I am writing the 
same message to multiple connected clients can I use the OnClientWrite event 
somehow?  Thanks.

Eric


"Remy Lebeau (TeamB)" <no.spam@no.spam.com> wrote in message 
news:4443ca2a$1@newsgroups.borland.com...
>
> "Eric Patterson" <eric.patterson@bepco.com> wrote in message
> news:44439c71$1@newsgroups.borland.com...
>
>> I check to make sure there is an active connection right before I do
>> a SendText and pass it an ansistring.
>
> Your code is not using SendText() correctly in general.  You are not 
> taking
> into account that SendText() may not send all of your data in a single
> operation, requiring you to re-call SendText() multiple times in a loop in
> order to send all of your string.  Please go to http://www.deja.com and
> search through the newsgroup archives.  Sample code has been posted many
> times before.
>
> The exception is being thrown at random times usually after running more
>> then 6 hours.  The exception that is being thrown is an invalid integer
>> exception.
>
> Do you mean that you are getting an EListError exception with a message of
> "List index out of bounds (12345)" ?  If so, then the only way that
> particular exception can occur in the code you showed is if you are 
> passing
> an incorrect index value to the Connections[] property.
>
>
> Gambit
>
> 
Technical Details
Message-ID: <4443d955$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news1.google.com!news.maxwell.syr.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.cw.net!cw.net!news-FFM2.ecrc.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <44439c71$1@newsgroups.borland.com> <4443ca2a$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: "Eric Patterson" <eric.patterson@bepco.com>
Newsgroups: borland.public.cppbuilder.internet.socket
References: <44439c71$1@newsgroups.borland.com> <4443ca2a$1@newsgroups.borland.com>
Subject: Re: TServerSocket SendText Exception
Date: Mon, 17 Apr 2006 14:07:02 -0400
Lines: 45
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2869
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 70.225.107.130
Message-ID: <4443d955$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1145297237 70.225.107.130 (17 Apr 2006 11:07:17 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news1.google.com!news.maxwell.syr.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.cw.net!cw.net!news-FFM2.ecrc.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail