
On 8/10/2013 6:41 PM, Geoff Shannon wrote:
On Saturday, August 10, 2013, niXman wrote:
named_pipe_object named_pipe_server::accept();
There is synchronous accept, but there is no asynchronous accept. Why?
Mainly for simplicity of the first implementation and because that seems to start overlapping a lot with Boost.Asio territory.
OK, but you still need an explanation of how the end-user should use your named pipe functionality to do asio with each member function in your class where asio is possible. Using asio with named pipes in Windows involves making a connection, accepting a connection, sending data, and receiving data. In other words using asio with named pipes means never waiting on anything, but checking periodically if some operation has completed and doing other things if it has not.
Once the initial implementation is working that would be high on the list of new features ;)
My intention for implementation targets are linux and windows since I have some experience with those platforms. Under Windows I intend to use the Named Pipe feature so your input would be invaluable Edward.
Glad to give it, but you don't have much code yet on which to comment. I would suggest you keep things really, really simple in your main interface. There should be the creation of a named pipe, listening for and accepting a connection, making a connection, reading data, and writing data. I think you should also consider your named pipe being outside of Boost.ASIO rather than as part of it, mainly because named pipes can be synchronous if the user wants to wait, let's say in some background thread, for operations to complete.