Trying Glib::signal_io().connect() with GIOChannel (from gnet)

Here is what I'm trying to do (without success):

ioChannel_.set(gnet_udp_socket_get_io_channel(socket_)); Glib::signal_io().connect(sigc::ptr_fun(aareceive), ioChannel_, Glib::IO_IN | Glib::IO_HUP);

where bool aareceive(Glib::IOCondition c) is my callback function
and ioChannel_ is an object of tIoChannel class:

class tIoChannel:public Glib::IOChannel
 virtual ~tIoChannel(){}
void set(GIOChannel *c){gobject_ = c;} //ouch, never gone work....I know but I'm desperate

gcc returns the following (and obvious) error:

error: no matching function for call to `Glib::SignalIO:: connect(sigc::pointer_functor1<Glib::IOCondition, bool>, tIoChannel&,

Is there a more appropriate method to do such a thing. I know that it is preferable to use the function Glib::IOChannel::create(...) but all I have is an udp_channel from gnet library or its GIOChannel by using the function gnet_udp_socket_get_io_channel(socket_). I really need help. How can I create a Glib::IOChannel with an IOChannel gtk (and not gtkmm!!!)

Thank you

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