glibmm I/O example



Hi,

I was trying to look for glibmm mailing list but all roads seem to be
leading
to gtkmm list. 
I am creating a socket connection in IO_IN | IO_OUT in non blocking mode.
  ioSource_ = Glib::IOSource::create (fd_, Glib::IO_IN | Glib::IO_OUT);
  ioSource_->connect(sigc::mem_fun(this, &Conn::iocCallBack));
  ioSource_->attach(mainContext_);
callback checks for read/write 
  if (_cond & Glib::IO_IN != 0)
...
  if (_cond & Glib::IO_OUT != 0)
...
The IN condition is never met. The OUT is called repeatedly, due to non
block.
I have a 1 micro sec sleep at the end of IO_OUT to keep cpu in check.
What am I doing wrong ? (besides possibly posting to wrong mailing list)

I'm using fedora 7 and update all patches regularly.
Any help,online pointers will be highly appreciated.
thanks
Neeraj

==================================================
I have switched 11 jobs. This is the 10th company I am working at.
http://www.geocities.com/rneeraj/text/creativity.html


      ____________________________________________________________________________________
Never miss a thing.  Make Yahoo your home page. 
http://www.yahoo.com/r/hs


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