ConnectNamedPipe and asio overlappped ptr
Found the issue. I've not associated pipe with IOCP
itself in server part. It can be done by wrapping pipe native handle returned by CreateNamedPipeA
into boost::asio::windows::stream_handle
just before calling ConnectNamedPipe
.
typedef boost::asio::windows::stream_handle StreamHandler;std::shared_ptr<StreamHandler> streamHandler = std::make_shared<StreamHandler>(*mIoService);streamHandle->assign(pipe);