how to generate glib events

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi All,
sorry to disturb, but I seem unable to fully grasp this.

I am using glib (not full GTK+) for a server application that needs to listen to multiple sockets/pipes.
I managed to have the GIOChannels working the way I need them.
Now I have (in some of the GIOChannel watches) a complete message to be processed. In order to serialize processing I would like to avoid processing directly in the watch callback, I would like to "queue" somehow the message and have another "watch" in the main loop to wait on this queue. I can do this easily using polling and timeouts, but this would introduce unacceptable delays. I'm currently trying to implement this using a pipe and another GIOChannel watching on it.
Is this the right way to do such a thing?
Is there another (better) way to do this.
Can someone point me to the right documentation (possibly some tutorial)?
Should I implement a new Source (g_source_new() and all associated paraphernalia)?
If so: where can I get some example?

Thanks in Advance
Mauro
_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux