[comp.windows.x] Integrating X event queues with other events

josh@VX.LCS.MIT.EDU.UUCP (03/22/87)

Has anyone had experience with integrating X events with other
asynchronous events such as interprocess[or] communication?  What I
want to do is write a procedure that efficiently (without polling)
returns to me the next event that occurs, be it X server generated, or
otherwise.  I am new to Unix system programming, though I've done this
sort of thing on VMS.

After paging through the Xlib code for reading events and looking
through Sun/Unix documentation, it seems that I have to find the
socket a client uses to talk to the server, and lump it together with
other client-owned sockets in a SELECT call.

This seems straightforward enough, though it requires accessing Xlib
internal data.  Does anyone have any caveats about this approach, or
is there a better way?  How portable are programs that use sockets?
How portable are programs that refer to Xlib internal data structures?
Are sockets a UNIX concept, BSD concept, or a SUN concept?

Thanks very much,
-Joshua D. Marantz