0
votes

epoll() can do its poll on lots of fd types such as normal fd, sockets, timefd, eventfd, etc...

Can BOOST do it also somehow? I saw in io_service that it supports only:

The io_service class provides the core I/O functionality for users of the asynchronous I/O objects, including:

boost::asio::ip::tcp::socket
boost::asio::ip::tcp::acceptor
boost::asio::ip::udp::socket
deadline_timer.

Is there another way?

1

1 Answers

2
votes

The documentation describes some, but not all, of the things the io_service class can do. Note the that it says "including", not "only". Also, the next sentence in the documentation reads:

The io_service class also includes facilities intended for developers of custom asynchronous services.

If you are reading or writing to a file descriptor that you have created directly, you can use boost::asio::posix::stream_descriptor. You can use the serial_port classes. You can operate on files. I think you'll be able to map your operation; if you still have trouble ask a more specific question.