Newsgroups : Borland : borland.public.delphi.internet.winsock : 2007 Nov : Should TidTCPServer (Indy 9.0.10) automatically disconnect all clients when clos
| Subject: | Should TidTCPServer (Indy 9.0.10) automatically disconnect all clients when clos |
| Posted by: | "Serge Kravchenko" (suppo..@truecafe.net) |
| Date: | Thu, 15 Nov 2007 14:10:51 |
Hello guys,
I have been using standard Delphi sockets for a long time, would like to try
out Indy now because of some problems...
I've written a small application: TidTCPServer and TidTCPClient components,
start the server, connect the client, stop the server. To my surprise, the
client remains connected (TidTCPClient.Connected = True):
===================
procedure TfmMain.StartServer(Sender: TObject);
begin
Server1.DefaultPort := 77788;
Server1.Active := True;
end;
procedure TfmMain.ConnectClient(Sender: TObject);
begin
Client1.Host := '127.0.0.1';
Client1.Port := 77788;
Client1.Connect();
end;
procedure TfmMain.StopServer(Sender: TObject);
begin
Server1.Active := False;
end;
===================
Should the server disconnect all connected clients?
Thank you in advance!
Regards,
Serge.