nanogui: nano-X --> waiting_for_event
Subject:
nano-X --> waiting_for_event
From:
"Jonas Greutert" ####@####.####
Date:
29 Dec 2006 10:46:53 +0000
Message-Id: <F8CD2433E50BAB4AA9B818D1AE30CA3BBD9E17@GILA.netmodule.intranet>
Hi
I do not see the reason for some implementation specifics of the nano-X
client server protocol. I.e. what is the reason that the server only
sends events to the client on request and not as soon as there is an
event?
For testing I changed the code in srvmain.c as follows:
Line 235 and line 650:
curclient->waiting_for_event = TRUE; /* was FALSE */
That way, *no* GrPrepareSelect, i.e. AllocReq(GetNextEvent); GrFlush();
is required in the client. The client can simply do a select (on the
nanox fd) and call GetNextEvent. Events are queued in the client socket.
Now, the only thing that remains to be resolved is the select in
_GrGetNextEventTimeout (client.c)... Basically, a new GetNextEvent has
to be written that does not include a select statement (the select shall
be outside of the nano-X client).
Probably, GrServiceSelect is very near to what I would need.
However, before I continue, I would like to get your feedback. Maybe I
do misunderstand something here.
Cheers,
-- Jonas