Feature #1142

Expose ioService to app

Added by Junxiao Shi over 7 years ago. Updated over 7 years ago.

Target version:
Start date:
Due date:
% Done:


Estimated time:
1.00 h


ndn::Node::ioService_ should be exposed to application,
so that application can make use of async IO and timers.

Without this feature,

  • app has to create a separate thread for its own async IO and timers
  • or, NDN client cannot process events promptly if app doesn’t invoke ndn::Node::processEvents frequently enough

In libccn, equivalent feature exists as:

Related issues

Related to NFD - Task #1141: ping applicationClosedJerald Paul Abraham01/28/2014


Updated by Junxiao Shi over 7 years ago

It seems ndn::Node::Node(const ptr_lib::shared_ptr<Transport>& transport, const ptr_lib::shared_ptr<boost::asio::io_service> &ioService); allows the app to pass in its own boost::asio::io_service.
This is better design than my proposal above.

However, ndn::Face::getAsyncService does not exist.
And the comments of this function should state that boost::asio::io_service::run is an acceptable alternative to ndn::Node::processEvents.


Updated by Alex Afanasyev over 7 years ago

  • Subject changed from expose ioService to app to Expose ioService to app
  • Due date set to 01/24/2014
  • % Done changed from 0 to 50
  • Estimated time set to 1.00 h

I haven't yet finished updating Face abstraction, but I have a preliminary commit in gerrit for that. Will revise and commit it soon.


Updated by Alex Afanasyev over 7 years ago

  • Status changed from New to Closed
  • % Done changed from 50 to 100

Also available in: Atom PDF