Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Apr : Re: TServerSocket.OnClientConnect is not executing.... why?
| Subject: | Re: TServerSocket.OnClientConnect is not executing.... why? |
| Posted by: | "Remy Lebeau (TeamB)" (no.spam@no.spam.com) |
| Date: | Fri, 28 Apr 2006 10:12:00 |
"John Klimek" <jklimek@gmail.com> wrote in message
news:44524a45$1@newsgroups.borland.com...
> // Infinite loop (eg. just have GameServer object accept/process
connections)
> while (true) do
> begin
> sleep(100);
> end;
You are using TServerSocket in non-blocking node. Non-blocking sockets
require the message queue in order to trigger their events, because the OS
issues them as window messages that TServerSocket handles internally. Your
loop above is not pumping the message queue for new messages at all. You
need to call Application.ProcessMessages() periodically.
Gambit