Asio contains classes to allow asynchronous read and write operations to
be performed on Windows
such as named pipes.
For example, to perform asynchronous operations on a named pipe, the following object may be created:
HANDLE handle = ::CreateFile(...); windows::stream_handle pipe(my_io_service, handle);
These are then used as synchronous or asynchronous read and write streams. This means the objects can be used with any of the read(), async_read(), write(), async_write(), read_until() or async_read_until() free functions.
The kernel object referred to by the
must support use with I/O completion ports (which means that named pipes
are supported, but anonymous pipes and console streams are not).
are only available at compile time when targeting Windows and only when
the I/O completion port backend is used (which is the default). A program
may test for the macro
to determine whether they are supported.