Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!umich!samsung!usc!ucsd!ucbvax!bloom-beacon!viking.UUCP!dpb From: dpb@viking.UUCP (Don Bennett 433-3311, 408) Newsgroups: comp.windows.x Subject: Re: Need Help with mixing RPC and X Message-ID: <9005312234.AA18852@viking.frame.com> Date: 31 May 90 22:34:26 GMT Sender: daemon@athena.mit.edu (Mr Background) Organization: The Internet Lines: 43 > 1. The ability to tell XtMainLoop to look for an RPC request while > looking for X events, and have it call an appropriate callback. > > or > > 2. The capability to wait for either an RPC request or an X event and > calling the appropriate procedure to handle the RPC request or the > X event depending on what was pending. This is similar to what I > do no for stdin, but I have a feeling that this is not PC in X. How about this? Works for me.... /* * Function Xt will use to process pending input on the RPC * file descriptor; */ rpcListen(client_data, source, id) caddr_t client_data; int *source; XtInputId *id; { svc_getreq(1 << *source); } /* * main program */ main() { int fd; svc_register(transp, ...); fd = transp->xp_sock; XtAppAddInput(_XtDefaultAppContext(), fd, XtInputReadMask, rpcListen, 0); XtMainLoop(); } Don Bennett (408)433-3311 dpb@frame.com Frame Technology