Board index » delphi » How to disconnect a idCmdTCPClient properly ?
SouchMan
Delphi Developer |
How to disconnect a idCmdTCPClient properly ?2004-09-15 05:11:08 AM delphi248 Hi ! in first, sorry for my poor english ... I try to use the indy (last version of indy 10) component IdCmdClient / Server but i'v a big problem : i can connect the two compo, transfert data, all is working but when i want to disconnect, my client application freeze ! if i force the closing my server crash too ... here is my test code... Client : procedure TForm1.Button1Click(Sender: TObject); begin IdCmdTCPClient1.host:='127.0.0.1'; IdCmdTCPClient1.port:='12345'; IdCmdTCPClient1.Connect; end; procedure TForm1.Button2Click(Sender: TObject); begin IdCmdTCPClient1.Disconnect; end; Serveur : procedure TForm1.Button1Click(Sender: TObject); begin IdCmdTCPServer1.binding:='0.0.0.0:12345'; IdCmdTCPServer1.Active:=True; end; procedure TForm1.Button2Click(Sender: TObject); begin IdCmdTCPServer1.Active:=false; end; so, is there something wrong ? i try this with several computer and 2 different version of indy 10 and i always have the problem ... What do you think about this ? Thanks ! |