Boost logo

Boost Users :

Subject: [Boost-users] [asio] using ASIO with pcap_get_selectable_fd?
From: Dustin Spicuzza (dustin_at_[hidden])
Date: 2009-05-13 13:03:10


We're wanting to use Boost ASIO for doing socket operations and other
asynchronous operations, but we also are using libpcap on multiple
links. Currently, we're just getting fd's from pcap_get_selectable_fd()
and using a select() loop to dispatch the loops when it's ready.
Ideally, we want to use ASIO to do the select() part now instead of what
we have, so theres less code to maintain.

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?



Innovation is just a problem away

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at