Re: unexpected behavior with GIOChannels?

check eof($sock) everytime the IO callback gets called? seems awfully
wasteful when there's a signaling/callback mechinism already in
place. 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 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]