Newsgroups : Borland : borland.public.delphi.internet.winsock : 2005 Nov : TIdECHOServer.DoExecute CPU 100%
| Subject: | TIdECHOServer.DoExecute CPU 100% |
| Posted by: | "child" (jn_chi..@tom.com) |
| Date: | Sun, 6 Nov 2005 22:25:02 |
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;