Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Apr : Re: Connection lost due to "connection reset by peer"-error
| Subject: | Re: Connection lost due to "connection reset by peer"-error |
| Posted by: | "Remy Lebeau (TeamB)" (no.spam@no.spam.com) |
| Date: | Mon, 24 Apr 2006 13:34:40 |
"Remy Lebeau (TeamB)" <no.spam@no.spam.com> wrote in message
news:444d365f$1@newsgroups.borland.com...
> For example:
Small additions:
TMyNNTPThread = class(TIdPeerThread)
...
public
...
procedure Disconnect; // <-- add this
...
end;
TForm1 = class(TForm)
...
procedure IdTCPServer1Disconnect(AThread: TIdPeerThread); // <-- add
this
...
end;
...
procedure TMyNNTPThread.Disconnect;
begin
if fClient.Connected then fClient.Disconnect;
end;
procedure TForm1.IdTCPServer1Disconnect(AThread: TIdPeerThread);
begin
TMyNNTPThread(IdTCPClient1).Disconnect;
end;
Gambit
none