Reading this question:
Delphi Windows Service Design, I saw that most designer use this code below in the OnExecute
of the TService
or in the TThread
method, in order to keep service alive.
while not Terminated do
begin
// do something
end;
But what if I need (and I do) to create a service to respond (using Indy) to messages sent by the main application in order to send back some authentication data, what do I do with this code, ignore it or put some Sleep()
in it?