
13 May
2009
13 May
'09
6:09 p.m.
It seems like that if you add a descriptor to an io_service, you *have* to read or write some bytes to/from it, as opposed to just waiting for it to be ready (as libpcap wants). Is there a way to add an fd to an ASIO io_service and *not* read from it, but only call a routine when its ready to read?
Probably, the following example can help you: "Simulation of a third party library that wants to perform read and write/ operations directly on a socket" http://www.boost.org/doc/libs/1_39_0/doc/html/boost_asio/example/nonblocking...