Re: unexpected behavior with GIOChannels?
- From: <nega exmachinae net>
- To: Jörn Reder <joern zyn de>
- Cc: gtk-perl-list gnome org
- Subject: Re: unexpected behavior with GIOChannels?
- Date: Sun, 8 Jun 2003 17:47:11 -0400
check eof($sock) everytime the IO callback gets called? seems awfully
wasteful when there's a signaling/callback mechinism already in
place. Gtk2::Helper.pm does exactly what I'm doing with:
Glib::IO->add_watch($sock->fileno, 'G_IO_IN', \&io_handler);#, $data);
Glib::IO->add_watch($sock->fileno, 'G_IO_HUP', sub {Glib::Source->remove($io_id)});#, $data);
My point is that i never see G_IO_HUP, when
http://developer.gnome.org/doc/API/2.0/glib/glib-IO-Channels.htm says
that it should be the condition that gets flagged when the socket
drops. So even if i were using Gtk2::Helper->add_watch(),
hup_id => Glib::IO->add_watch ($fd, 'G_IO_HUP', $callback, $data),
would be pretty useless with out ever seeing G_IO_HP.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]