Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Nov : Re: How can I find out what type of record I'm receiving prior to cracking it op

www.cryer.info
Managed Newsgroup Archive

Re: How can I find out what type of record I'm receiving prior to cracking it op

Subject:Re: How can I find out what type of record I'm receiving prior to cracking it op
Posted by:"Remy Lebeau (TeamB)" (no.spam@no.spam.com)
Date:Thu, 16 Nov 2006 20:41:52

"Clay Shannon" <blacky@redgreen.com> wrote in message
news:455cfc8d$1@newsgroups.borland.com...

> In the TServerSocket's OnClientConnect() event, ReceiveText has the value
> I sent from the test app. In TServerSocket's OnClientRead() event,
however,
> ReceiveLength is 0.

As it should be, because you read the data in the OnClientConnect event,
before the OnClientRead event is triggered.  You can't read data in one
event and expect the data to still be in the socket in another event.  Once
data is read from a socket, it is gone from the socket.  You cannot read it
again.  If you need to preserve the data, then you have to cache it yourself
somewhere.


Gambit

Replies:

In response to:

www.cryer.info
Managed Newsgroup Archive