🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: TClientSocket OnRead event issues

#1939
From: Josh Arnold
Date: Thu, 14 Sep 2006 17:26
46 lines
2384 bytes
Problem solved for now,

It appears that the client socket needs a "garbage read" in order to get the
OnRead event working.
Since the OnConnect event fires I just stuck in a
socket->RecieveText() and now the responses from the server are heard.

Thanks for the help, don't know if this qualifies as a bug or not?

-Josh


"Josh Arnold" <jarnold@atterotech.com> wrote in message
news:45096c00@newsgroups.borland.com...
> Ok, I modified my code per Hans suggestion and still nothing.
>
> The OnConnect event is fired and I can get the RemoteAddress from the
> socket, but the responses from the server still do not trigger any OnRead
> events.
>
>
> "Hans Galema" <notused@notused.nl> wrote in message
> news:45095b16@newsgroups.borland.com...
> > Josh Arnold wrote:
> >
> > >  client->Open();
> > >  client->OnRead = myClientRead;
> >
> > Assign the eventhandler first:
> >
> >    client->OnRead = myClientRead;
> >    client->Open();
> >
> > What if you assign an onconnecthandler too?
> >
> >    client->OnConnect = myClientConnect;
> >    client->OnRead = myClientRead;
> >    client->Open();
> >
> > Does that trigger?
> >
> > You should wait for OnConnect before sending anything.
> >
> > HAns.
>
>
Technical Details
Message-ID: <45098f13@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!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> <45095b16@newsgroups.borland.com> <45096c00@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> <45095b16@newsgroups.borland.com> <45096c00@newsgroups.borland.com>
Subject: Re: TClientSocket OnRead event issues
Date: Thu, 14 Sep 2006 13:26:14 -0400
Lines: 48
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: <45098f13@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1158254355 70.89.2.105 (14 Sep 2006 10:19:15 -0700)
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail