Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!ncar!boulder!stan!dce From: dce@Solbourne.COM (David Elliott) Newsgroups: comp.windows.x Subject: Re: Multiple-server X clients - do they exist? Keywords: X Message-ID: <2305@marvin.Solbourne.COM> Date: 8 Sep 89 02:06:53 GMT References: <3522@blake.acs.washington.edu> <124309@sun.Eng.Sun.COM> Reply-To: dce@Solbourne.com (David Elliott) Distribution: usa Organization: Solbourne Computer Inc., Longmont, Colorado Lines: 27 In article <124309@sun.Eng.Sun.COM> dmc@sun.UUCP (Doug Cook) writes: >In article <3522@blake.acs.washington.edu> mbader@cac.washington.edu (Mark Bader) writes: >>Does anyone know if a multiple-server X client is possible? For >>instance, is there a way to start up an X client and sent its output >>to multiple displays at the same time? > >There are some subtleties, though. Because you're using select() rather than >XNextEvent() to determine when server events are waiting, you need to explicitly >flush events for all the display connections at key points (XNextEvent flushes >events before it tries to read them). There's another subtlety that can cause problems when using select() to handle multiple connections. On EOF, select() can return "there's something to read", whereas the ioctl FIONREAD, as used by BytesReadable defined in Xlibos.h and used in the code to get new events, returns "there are 0 bytes to read". In other words, be prepared to handle a select() returning a 0 followed by a "no event" indication as a "connection closed". Gary Aitken (garya@Solbourne.COM) can be contacted for more information. I can't. -- David Elliott dce@Solbourne.COM ...!{uunet,boulder,nbires,sun}!stan!dce "We don't do this because we love you or like you...we don't even know you!"