Re: Event-driven programming
- From: Paolo Molaro <lupus ximian com>
- To: "Gtk::Perl list" <gtk-perl-list gnome org>
- Subject: Re: Event-driven programming
- Date: Mon, 30 Apr 2001 23:55:59 +0200
On 04/24/01 dLux wrote:
I have a question regarding to the event-driven programming in Gtk.
I have read the Gtk::cookbook, so the question is quite more
advanced than the things found there.
I want to design a general event-driven mechanism which works
between processes, not only inside a single program. I want to
declare system-global names (imagine this like file names) for data,
and I want to install handlers for this file changes. I think I make
a pipe with the system-global name in a specified name, e.g. I will
make a pipe in /tmp/comm/todo_data. But the problem is that a pipe
is only one good for one-to-one communication. I want one-to-more
communication without too much complexity.
Currently I am thinking about a daemon, which binds a unix domain
socket, and accepts connections. If someone writes to the socket, it
multiplexes that to the other sockets. Sophisticated methods can
also be developed (it can maintain subscriber's list for events,
etc).
Does anyone has more elegant solution for this problem?
Not really a gtk/perl question, but....
You should probably have a look at the perlipc manpage.
The POE module may be also useful to some extent, maybe to
get some ideas out of it.
lupus
--
-----------------------------------------------------------------
lupus debian org debian/rules
lupus ximian com Monkeys do it better
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]