Boost logo

Boost Users :

Subject: Re: [Boost-users] [Asio] Need help making a custom service
From: Eric Prud'hommeaux (eric_at_[hidden])
Date: 2015-03-11 07:25:37


* svante karlsson <saka_at_[hidden]> [2015-03-10 20:35+0100]
> If you got it working by wrapping the file descriptor - post it and I'll
> give it a shot on tidying it up.

I *think* I have a vested interest in this as well. An age or two ago,
I started an inotify interface on a query engine (when some data file
changes on disk, it re-reads). I didn't know what I was doing and
ended up with something that tightloops.
  https://github.com/ericprud/SWObjects/blob/sparql11/lib/SimpleServer.hpp#L1157

Since inotify works on fds, what you're doing might teach me my next
steps. (I'd of course love to see inotify/fsevent/FileSystemWatcher
widgets in Asio and am happy to donate whatever I have of value).

> 2015-03-10 20:05 GMT+01:00 Kyle Edwards <kedwards_at_[hidden]>:
>
> > On Tue, 2015-03-10 at 14:53 +0100, Bjorn Reese wrote:
> > > On 03/09/2015 09:34 PM, Kyle Edwards wrote:
> > >
> > > > 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?
> > >
> > > A possibility could be to wrap the file descriptor in a udp::socket
> > > (or possibly your own derived from basic_datagram_socket) and use
> > > async_receive(null_buffers) with the message_out_of_band flag set.
> > > Never tried it myself though.
> >
> > Alright, I've written a custom service that just wraps the relevant UDP
> > classes (service, implementation) and does async_receive() with
> > message_out_of_band. It's hairy, but it seems to work. Thank you!
> > _______________________________________________
> > Boost-users mailing list
> > Boost-users_at_[hidden]
> > http://lists.boost.org/mailman/listinfo.cgi/boost-users
> >

> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users

-- 
-ericP
office: +1.617.599.3509
mobile: +33.6.80.80.35.59
(eric_at_[hidden])
Feel free to forward this message to any list for any purpose other than
email address distribution.
There are subtle nuances encoded in font variation and clever layout
which can only be seen by printing this message on high-clay paper.

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