Board index » delphi » Indy lock OnExecute event
Larini
![]() Delphi Developer |
Indy lock OnExecute event2005-10-26 05:52:01 PM delphi189 Hello, I have the following situation: a client command put server in a loop until client send a "Release" command. But once inside the loop, the "OnExecute" method does not work anymore. Can anybody help? procedure TForm1.serverExecute(AThread: TIdPeerThread); var s:String; begin s:=AThread.Connection.ReadLn; inc(contador); caption:=inttostr(contador); if s='Hours' then begin AThread.Connection.WriteLn('1..'+DateTimeToStr(now)); AThread.Connection.WriteLn('2..'+DateTimeToStr(now)); AThread.Connection.WriteLn('.'); end if s='Release' then begin gRelease:=true; end else begin gRelease:=false; While not gRelease do begin application.ProcessMessages; end; end; end; |