Hi, I would like to know how to detect a client's broken link in an TWsocketserver application. Not a closed connection but really a broken one. For exemple the BrokenLink procedure below doesn't add anything in the Tlistbox1 when the connection is down.
** ** TMyClient = class(TWSocketClient) public RcvdLine : String; ConnectTime : TDateTime; UserName : String; ComputerName: String; OsType : String; end; ** ** public Procedure BrokenLink(Sender: TObject; ErrCode: Word); ** * * {**********************************************************************************} procedure TForm1.WSocketServer1ClientCreate(Sender: TObject;Client: TWSocketClient); Begin With Client As TMyClient Do Begin OnDataAvailable:= ClientDataAvailable; ConnectTime := Now; UserName :='Unknown'; ComputerName :='Unknown'; OsType :='Unknown' OnSessionClosed:=BrokenLink; End; End; {**********************************************************************************} Procedure TForm1.BrokenLink(Sender: TObject; ErrCode: Word); Begin ListBox1.Items.Add('BrokenLink : '+IntToStr(Errcode)); End; {**********************************************************************************} -- Sincerelly , BERTHELOT Olivier -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be