Hello Rooters,
I am trying to implement a server-client connection using TSocket.
Basicly the server is waiting for a signal TMonitor::Ready(TSocket*). If it gets such a signal the socket is added to a list and it sends stuff to it (in the attached example its a 2d-Histogram).
Everything works fine, but when the server is running a while() loop the signal will be processed only after a long time, even though I put a gSystem->ProcessEvents() statement into that while loop. I thought that every pending event will be processed when the program comes to this statement.
Am I doing something wrong?
Here is a short Discription of the attached code:
Run testserver.c (.x testserver.c) and then run testclient.c (.x testclient.c) in a new rootsession. You will see that everything works fine. The server finds the client immediately and connects to it.
Now run testserver.c (.x testserver.c) and press the start button (the Histogram will get filled and the rate is shown). Now run testclient.c (.x testclient.c) in a new rootsession. It takes about 5 min. for the client to connect to the server. If you press the stop button, the client will connect instantaneously to the server.
Is there something wrong in the way I am doing this?
Thank you
Lutz
testserver.c (6.28 KB)
testclient.c (2 KB)