Boost logo

Boost Users :

Subject: Re: [Boost-users] Using async_pipe as named pipe in windows
From: Stian Zeljko Vrba (vrba_at_[hidden])
Date: 2019-03-20 14:08:59

You need to read and understand topics linked from this overview page:
I'm unsure whether all the necessary steps are achievable using only asio (e.g., CreateNamedPipe and ConnectNamedPipe).

-----Original Message-----
From: Boost-users <boost-users-bounces_at_[hidden]> On Behalf Of parean via Boost-users
Sent: Wednesday, March 20, 2019 07:01
To: boost-users_at_[hidden]
Cc: parean <smirnov.d.p.1997_at_[hidden]>
Subject: [Boost-users] Using async_pipe as named pipe in windows

I have this code:

boost::asio::io_service ios;
  std::vector<char> buf(20);
  bp::async_pipe ap(ios, "\\\\.\\pipe\\SamplePipe");
  boost::asio::async_read(ap, boost::asio::buffer(buf),
    [](const boost::system::error_code &ec, std::size_t size) {});;

Now, I execute "echo 42 > \\.\pipe\SamplePipe" in the cmd and expect an asynchronous read to the buffer to occur. But instead I get the following
error: "All pipe instances are busy." I'm sure I'm doing something wrong.
Can you please tell me what should I add to my code for it to work?

Sent from:
Boost-users mailing list

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at