TserverSocket and TClientSocket

Posted by Georgi Gavrilski on Stack Overflow See other posts from Stack Overflow or by Georgi Gavrilski
Published on 2011-01-05T19:51:07Z Indexed on 2011/01/05 19:53 UTC
Read the original article Hit count: 402

Filed under:

I use this code to reveive data : But It's not work.Can you Help me ?

procedure TForm1.ServerSocket1ClientRead(Sender: TObject; Socket: TCustomWinSocket); var i:integer; sRec : string; begin for i := 0 to ServerSocket1.Socket.ActiveConnections-1 do begin with ServerSocket1.Socket.Connections[i] do begin sRec:=ReceiveText; if sRec <> '' then begin if RemoteAddress='192.168.0.1' then begin if ReceiveText='1' then Btn1.Color:=clNavy; ADOQuery1.Active:=True; end; if RemoteAddress='192.168.0.1' then begin if ReceiveText='2' then Btn1.Color:=clRed; Pnl1.Visible:=True;

     end;
   end;
  end;
end;

end;

© Stack Overflow or respective owner

Related posts about delphi