Hallo,
die Daten kann man auch im onExecute auslesen.
Beispiel:
Delphi-Quellcode:
procedure TTcpListener.onExecute(AContext: TIdContext);
var
clientIP : AnsiString;
mStream : TMemoryStream;
begin
clientIP := AContext.Binding.PeerIP;
if not AContext.Connection.IOHandler.InputBufferIsEmpty then
begin
mStream := TMemoryStream.Create;
try
AContext.Connection.IOHandler.InputBufferToStream(mStream);
mStream.Position := 0;
// transfer to FileManager
fileManager.addData(clientIP,mStream);
// decode data
if onlineMode then
decoderScheduler.add(clientIP,mStream);
finally
freeAndNil(mStream)
end;
end;
sleep(50);
end;
Grüße
Klaus