Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!yale!think.com!snorkelwacker.mit.edu!bloom-beacon!ZIA.AOC.NRAO.EDU!cflatter From: cflatter@ZIA.AOC.NRAO.EDU (Chris Flatters) Newsgroups: comp.windows.x Subject: Re: IPC problem Message-ID: <9011151700.AA28019@zia.aoc.nrao.edu> Date: 15 Nov 90 17:00:45 GMT Sender: daemon@athena.mit.edu (Mr Background) Organization: The Internet Lines: 17 > I have an application which needs to read data off a socket. I can > arrange for it to be sent a ClientMessage when this data is to be > transmitted, but since the amount of data could be fairly large (though > I'm working to keep it of moderate size), I'd rather not have the > application simply sit there (vis a vis X) while reading data. I'd > like to be able for it to respond to Expose events and the like while > still receiving data. Is there a reasonable way to do this? I'm using > just Xlib ons a SPARCStation running OpenWindows 2.0. Thanks! On Unix systems you can obtain the file descriptor of the X connection. You can then use the select system call (BSD interface) or the poll system call (System V interface) to see if either the X connection or your connection have data pending. You can then modify your main event driven loop to read from your socket when there is no activity on the X connection. Chris Flatters