Boost logo

Boost :

Subject: Re: [boost] [Interprocess] Named pipe interface proposal
From: Rob Stewart (robertstewart_at_[hidden])
Date: 2013-08-10 21:55:10


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.

___
Rob

(Sent from my portable computation engine)


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk