Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!decwrl!sun!eureka!argv From: argv%eureka@Sun.COM (Dan Heller) Newsgroups: comp.windows.x Subject: Re: Reading sockets from the Toolkit Message-ID: <103532@sun.Eng.Sun.COM> Date: 8 May 89 01:26:05 GMT References: <14403@duke.cs.duke.edu> <8905052147.AA00039@expo.lcs.mit.edu> Sender: news@sun.Eng.Sun.COM Reply-To: argv@sun.com (Dan Heller) Organization: Island Graphics Corporation, Marin County, CA Lines: 23 In article <8905052147.AA00039@expo.lcs.mit.edu> kit@EXPO.LCS.MIT.EDU (Chris D. Peterson) writes: > > Could some knowledgeable Toolkit programmer suggest the best way to add > > a new event to the toolkit main loop XtMainLoop() that will execute my > > callback function when data comes in over a socket. I am using Athena > > widgets if that makes a difference. > > Take a look at section 7.1.1 (Adding and Removing Input Sources) in > the X11R3 instrinsics manual I think this is exactly what you are looking > for. > Chris D. Peterson I hate to request this, but could you please discuss this in more detail? I think the question addresses more issues than it was intended-- specifically, I don't believe that Xt handles how the application is supposed to handle signals. The user is reading from a socket -- which is a file descriptor. There could be a SIGIO event delivered to the application's event handler for that signal interrupting something critical within Xt. If this routine does more Xt calls, then all sorts of havoc can result. dan