Board index » delphi » TIdECHOServer.DoExecute CPU 100%
child
Delphi Developer |
child
Delphi Developer |
TIdECHOServer.DoExecute CPU 100%2005-11-06 10:25:02 PM delphi173 IOHandler.CheckForDataOnSource(); replace with IOHandler.CheckForDataOnSource(5); will ok. function TIdECHOServer.DoExecute (AContext:TIdContext): boolean; begin result := true; with AContext.Connection do begin while Connected do begin IOHandler.CheckForDataOnSource(5); IOHandler.Write(IOHandler.InputBufferAsString); // Write(CurrentReadBuffer); end; end; end; |
Remy Lebeau (TeamB)
Delphi Developer |
2005-11-07 03:53:46 AM
Re:TIdECHOServer.DoExecute CPU 100%
"child" <XXXX@XXXXX.COM>writes
Quotefunction TIdECHOServer.DoExecute (AContext:TIdContext): boolean; the following instead: function TIdECHOServer.DoExecute (AContext: TIdContext): Boolean; begin with AContext.Connection.IOHandler do begin CheckForDataOnSource(5); if not InputBufferIsEmpty then begin Write(InputBufferAsString); end; end; Result := AContext.Connection.Connected; end; Gambit |