🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: TClientSocket OnRead event issues

#1941
From: Josh Arnold
Date: Thu, 14 Sep 2006 21:50
39 lines
2358 bytes
Ok,

I still don't see what is blocking the initial read but it seems to be
working now.

My new problem is that I need to send a lot of small messages and get them
back ideally in the order that they were sent.

What would be the best approach to this problem?



"Remy Lebeau (TeamB)" <no.spam@no.spam.com> wrote in message
news:45098bd2$1@newsgroups.borland.com...
>
> "Josh Arnold" <jarnold@atterotech.com> wrote in message
> news:450949ba$1@newsgroups.borland.com...
>
> Why are you waiting until after calling Open() to assign the event
handler?
> You should be doing it before instead:
>
>     client->OnRead = myClientRead;
>     client->Open();
>
> >  client->Socket->SendText("hello\n");
>
> You are not checking the return value to make sure that the full text is
> actually being sent.  You are not taking into account that partial text
can
> be sent, requiring you to re-send the remaining data again.  You are also
> not taking into account that if a send operation blocks, the send will
> report a failure, and you then have to wait until the OnWrite event is
> triggered before you can send any further data.
>
>
> Gambit
>
>
Technical Details
Message-ID: <4509ccfc$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news.glorb.com!newsgate.cistron.nl!xs4all!news2.euro.net!213.132.189.2.MISMATCH!multikabel.net!feed20.multikabel.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <4508a026@newsgroups.borland.com> <4508a3f3$2@newsgroups.borland.com> <4508aab1$1@newsgroups.borland.com> <4508b143@newsgroups.borland.com> <450949ba$1@newsgroups.borland.com> <45098bd2$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,6164f1b08fcaf5c2
X-Google-Attributes: gid11508e,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Josh Arnold" <jarnold@atterotech.com>
Newsgroups: borland.public.cppbuilder.internet.socket
References: <4508a026@newsgroups.borland.com> <4508a3f3$2@newsgroups.borland.com> <4508aab1$1@newsgroups.borland.com> <4508b143@newsgroups.borland.com> <450949ba$1@newsgroups.borland.com> <45098bd2$1@newsgroups.borland.com>
Subject: Re: TClientSocket OnRead event issues
Date: Thu, 14 Sep 2006 17:50:28 -0400
Lines: 41
Organization: AtteroTech
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
NNTP-Posting-Host: 70.89.2.105
Message-ID: <4509ccfc$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1158270204 70.89.2.105 (14 Sep 2006 14:43:24 -0700)
Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news.glorb.com!newsgate.cistron.nl!xs4all!news2.euro.net!213.132.189.2.MISMATCH!multikabel.net!feed20.multikabel.net!newsfeed.freenet.de!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail