re: Perl, GTK, Network



You may wish to look into Glib::IO->add_watch.

<snip href="http://gtk2-perl.sourceforge.net/doc/pod/Glib/MainLoop.html";>

integer = Glib::IO->add_watch ($fd, $condition, $callback, $data=undef,
$priority=G_PRIORITY_DEFAULT)

</snip>

Quoting Mark Lehrer <mark knm org>:
What is the best strategy for handling the network in Gtk? Is there a
way to attach some kind of gtk signal handler to incoming network
traffic, or is it better to use some kind of threading?

I basically need to have the Gtk part send outgoing messages, but I
also need to respond to incoming messages and update a label to show
the latest incoming message... fairly basic I guess.

Thanks,
Mark





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