Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Jun : Re: TCP client/server

www.cryer.info
Managed Newsgroup Archive

Re: TCP client/server

Subject:Re: TCP client/server
Posted by:"Remy Lebeau (TeamB)" (no.spam@no.spam.com)
Date:Mon, 5 Jun 2006 15:36:56

"Jamie Dale" <j.dale@turboz.net> wrote in message
news:44849ffe@newsgroups.borland.com...

> Try this on the server side: AThread.Connection.Disconnect;

He is already doing exactly that.

> On the client Side:
<snip>

Richard alread stated that the client does not expect a response from the
server, so calling ReadLn() is not the correct thing to do on the client
side.  There are only 1 place in his client side that the exception could be
occuring, and that is on the WriteLn().  Since the server is calling
ReadLn(), there should be no reason for WriteLn() to be called after the
server has disconnected the socket, except under two possible conditions:

1) the server's ReadLn() is using a timeout, so the connection is being
disconnected before the WriteLn() finishes

2) the server is closing the socket before ever calling ReadLn().


Gambit

Replies:

In response to:

www.cryer.info
Managed Newsgroup Archive