Boost logo

Boost :

Subject: [boost] [ASIO] Windows named pipes
From: Fernando Lemos (fernando_at_[hidden])
Date: 2010-01-06 07:35:17


I've implemented support for Windows named pipes in Asio. Windows
named pipes are created with CreateFile, and you can use
WriteFile/ReadFile with overlapped I/O to read from and/or write to
them. It uses win_iocp_handle_service (just like serial_port_service),
so it's really simple code.

I've attached the implementation to this e-mail (hoping the
attachments will get through) so that you guys can import it into
Boost if you find it worthwhile (feel free to license it under the
Boost license). Note, though, that it needs to be "Boostfied" because
I had to adhere to the coding conventions of the current project I was
working on (this includes variable naming conventions, code style
conventions, namespacing, and the separation of named_pipe into
basic_named_pipe and named_pipe, and so on). And since this is my
first interaction with Boost "internals", I won't be surprised if you
guys find rookie mistakes in it.

I've tested this implementation under Vista and Windows 7, using Boost
1.40 (but 1.41 should work just fine too) and VC++ 2008 Express. I
used pipes in message mode, but I believe both message and stream
modes will work.


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