On Tue, Aug 09, 2005 at 02:48:32PM -0600, Clint Jeffery wrote:
> 
> [Wendell describes a fascinating behavior under X11, where his Unicon
> program is generating lots of spurious network traffic.]
> 
> Wendell, is your program using the GUI classes, or is it handwritten, or
> using some other library?

Well, it appears that the problem is in my attempt to use window
operations with network operations.  The relevant code is:

  w := open("MCDU", "x")

  fdlist := [ ]
  uf := open( ":8512","nua")
  put(fdlist, \uf)

  # more "nua" opens here...

  put(fdlist, 50)       # the timeout

  repeat
  {
    while *Pending(w) > 0 do   # <<--- the offending call
        evhandle(w)

    if *(q := (select ! fdlist)) > 0 then
    {
      # handle network input
    }
  }

If I comment out the 'while *Pending ... evhandle(w)' part, the
X11 focus network traffic disappears (and no mouse events are
handled!).

The window events and the network events are handled fine, so
the program basically works. But the call to Pending appears to
call the X11 code to determine focus, which causes the network
traffic (at 20 Hz, which is the same as the select timeout).

Is there a better way to read both mouse events and network
traffic?

Wendell



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Unicon-group mailing list
Unicon-group@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/unicon-group

Reply via email to