Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Oct : Re: TCP server to client messages...
| Subject: | Re: TCP server to client messages... |
| Posted by: | "Remy Lebeau (TeamB)" (no.spam@no.spam.com) |
| Date: | Wed, 18 Oct 2006 14:52:29 |
<tdunsford@gmail.com> wrote in message
news:1161201676.547321.111260@i3g2000cwc.googlegroups.com...
> On the client end, what is the correct way to watch for messages
> coming from the server. I've written a thread class that just calls
> client.IOHandler.ReadLn(#10,0) in a loop and deals with data
> that comes in.
That is exactly what you need to do.
> It seems to work ok, but i cant help feeling that there is a "proper"
> way to do this.
If the server is sending unsolicited data that you are not expecting (such
as data for a command that must wait for a reply), then using a thread is
the "proper" way to do it.
Gambit