As MJN said, once you Connect()
to the server, you use the TIdIOHandler.IOHandler
property to read/write data as needed, eg:
var
data: TIdBytes;
Client.Host := AHost;
Client.Port := APort;
Client.ConnectTimeout := 3000;
Client.ReadTimeout := 3000;
Client.Connect;
try
Client.IOHandler.Write(Byte($FE));
Client.IOHandler.Write(Byte($01));
Client.IOHandler.ReadBytes(data, 2048);
finally
Client.Disconnect;
end;
// parse data as needed...