Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext

Pipes

Boost.Asio provides support for portable anonymous pipes on POSIX and Windows (when I/O completion ports are available). For example, to create and use a connected pair of pipe objects:

boost::asio::readable_pipe read_end(my_io_context);
boost::asio::writable_pipe write_end(my_io_context);
boost::asio::connect_pipe(read_end, write_end);

write_end.async_write_some(my_write_buffer,
    [](boost::system::error_code e, size_t n)
    {
      // ...
    });

read_end.async_read_some(my_read_buffer,
    [](boost::system::error_code e, size_t n)
    {
      // ...
    });
See Also

basic_readable_pipe, basic_writable_pipe, connect_pipe, readable_pipe, writable_pipe.


PrevUpHomeNext