Boost logo

Boost :

Subject: Re: [boost] [Interprocess] Named pipe interface proposal
From: Edward Diener (eldiener_at_[hidden])
Date: 2013-08-11 09:55:06

On 8/10/2013 9:55 PM, Rob Stewart wrote:
> On Aug 9, 2013, at 9:45 PM, Geoff Shannon <geoffpshannon_at_[hidden]> wrote:
>> I emailed the list a while ago that I was starting to work on a named pipe implementation for potential inclusion in the Boost.Interprocess library,
>> and now I finally have some concrete evidence of progress. I've come up with a header file for my proposed interface and I would really appreciate any and all feedback on it.
> named_pipe_object is an odd name. Why "object"?
> Construction with char const * attaches to an existing pipe, while with a std::string it creates a pipe? That's horrible. Those ctors should have the same behavior. Use an enumerated type argument to distinguish on behavior from the other or use the Named Constructor Idiom.
> "some" in read_some() and write_some() is not helpful.
> How does read_some() know the size of the supplied buffer? You need a size argument (or buffer type discussed separately).
> write_some() also needs a size argument; you must account for binary data.
> I don't think named_pipe_server is needed. One creates or connects to a named pipe. A single class can handle both aspects, through different constructors.

I heartily agree with this last comment. KISS. There's no need for two
different classes. A single named pipe class should be able to handle
creation of a named pipe, listening for and accepting a connection,
making a connection, reading data, and writing data. It really is that
simple at the basic level.

Boost list run by bdawes at, gregod at, cpdaniel at, john at