Boost Users :
Subject: Re: [Boost-users] [Asio] Need help making a custom service
From: Kyle Edwards (kedwards_at_[hidden])
Date: 2015-03-09 16:34:57
Thanks for the quick reply.
On Mon, 2015-03-09 at 21:21 +0100, Bjorn Reese wrote:
> Then you can wrap your file descriptor in a posix::stream_descriptor
>  and wait on events using async_read_some() with null_buffers() .
> An example can be found in . The example assumes that the wrapper
> does not take ownership of the file descriptor (if it does, then you
> can omit the non_closing_service.)
Thanks for the suggestion. Unfortunately, though, I don't think
async_read_some() is going to work for me. Here is an excerpt from
template <typename Handler>
void async_read_some(implementation_type& impl,
const null_buffers&, Handler handler)
start_op(impl, reactor::read_op, p.p, false, false);
Notice the use of reactor::read_op. I've done a little more digging
through the Boost.Asio code, and it looks like, for this application, I
need to use reactor::except_op instead. Is there a simple class/function
that does this? Or will I have to implement it myself?
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net