Discussion:
Reconnecting
(too old to reply)
Daniel Manchester
2008-07-21 18:12:23 UTC
Permalink
I have a server application making a POP connection that occasionally
disconnects with an EIdSocketError connection reset by peer. The
problem is that if I then try to connect to the server again the server
throws a EIdSocketError again so the
client can't connect unless I restart the application. I nead to know how
to handle a "bad" disconnection.

Thanks for your help
Daniel
Jamie Dale
2008-07-23 01:39:16 UTC
Permalink
Post by Daniel Manchester
I have a server application making a POP connection that occasionally
disconnects with an EIdSocketError connection reset by peer. The
problem is that if I then try to connect to the server again the server
throws a EIdSocketError again so the
client can't connect unless I restart the application. I nead to know how
to handle a "bad" disconnection.
If memory serves me correctly you must still disconnect the connection -
even though it has disconnected (if that makes any sense).

Normally disconnectsocket() does the trick if I remember correctly. I think
it must be done at both ends - Server and Client..

JD
Jamie Dale
2008-07-23 01:44:02 UTC
Permalink
Post by Jamie Dale
Post by Daniel Manchester
I have a server application making a POP connection that occasionally
disconnects with an EIdSocketError connection reset by peer. The
problem is that if I then try to connect to the server again the server
throws a EIdSocketError again so the
client can't connect unless I restart the application. I nead to know
how to handle a "bad" disconnection.
If memory serves me correctly you must still disconnect the connection -
even though it has disconnected (if that makes any sense).
Normally disconnectsocket()
Forgot to say thats assuming your using Indy..

Loading...