Hallo Dominik,
vielleicht könnte es so funktionieren.
Delphi-Quellcode:
type
TDataDeliveryThread = class(TThread)
private
FtcpServer: TidTcpServer;
FdataStack : TStringList;
public
constructor Create(tcpServer: TidTcpServer);
destructor Destroy:
procedure execute;
procedure addToStack(s: String);
end;
procedure TDataDeliveryThread.execute;
var
i: Byte;
begin
while not terminated do
begin
while FdataStack.count > 0 do
begin
for i:=0 to Ftcpserver.contexts.lockList.count -1 do
begin
(FtcpServer.contexts.lockList[i] as TidContext).connection.IOHandler.writeLn(FdataStack[0]);
end;
FdataStack.delete(0);
end;
FTcpServer.contexts.unlockList;
sleep(100);
end;
end;
(nicht geteste).
Grüße
Klaus