meine Lösung sieht jetzt so aus
Delphi-Quellcode:
function ReceiveBuffer(AClient: TIdTCPClient; var ABuffer: TBytes):
Boolean;
function SendBuffer(AClient: TIdTCPClient; ABuffer: TBytes): Boolean;
implementation
function ReceiveBuffer(AClient: TIdTCPClient; var ABuffer: TBytes): Boolean; var
LSize: LongInt;
begin
Result := False;
LSize := AClient.IOHandler.ReadLongInt();
AClient.IOHandler.ReadBytes(ABuffer, LSize, False);
Result := True;
end;
function SendBuffer(AClient: TIdTCPClient; ABuffer: TBytes): Boolean; begin
Result := True;
try
AClient.IOHandler.Write(LongInt(Length(ABuffer)));
AClient.IOHandler.WriteBufferOpen;
AClient.IOHandler.Write(ABuffer, Length(ABuffer));
AClient.IOHandler.WriteBufferFlush;
finally
AClient.IOHandler.WriteBufferClose;
end;
Result := True;
end;
"Out" Kannte ich noch gar nicht, Danke für die Tips !!!!