I am recently working a lot with boost::asio
and mulling over its documentation which is not of much help in some matters. I cannot wrap my head around a few questions which are associated with one another. The most important is this - when would I need to create my own io_service
implementation (and how to do it properly)?
Let's take an example. I want to handle message bus communication with asio
. The library that provides the API returns to me an opaque pointer to connection which allows me to only write requests and read responses. So far, so good. All these operations can be handled via boost::asio::post
operation within any io_context
really. Do I need a new io_service
here to handle this? Or an io_object
is sufficient here? Where to draw the line?
It is possible I don't really understand what these concepts (io_service
and io_object
) represent and this is the root cause of all the fuss
Aucun commentaire:
Enregistrer un commentaire