pipe - Windows named pipes A dx::pipe is a bidirection, multi-client, multi-threaded communication channel between a pipe client and a pipe server. Both pipe sides feature a dedicated read thread to receive data from the opposite side notifiying installable listener std::functions. On the service side, a pipe server is instantiated for each pipe client connection. Until a new client connects, the pipe::server::instance remains waiting in pipe::server::instance::connect within its dedicated pipe read thread. If a client disconnects the pipe::server::instance removes itself, terminating the read thread. The pipe::server::instance super class can be template-parameterized to allow mimicking user client behaviour. Windows arbitrarily serializes operations on synchronous pipe handles, limiting it's named pipe concurrent synchronous operation capabilities to exactly one synchronous pipe per process (i.e. exactly one per process), effectively forcing both the pipe::server and the pipe client to be implemented using asynchronous OVERLAPPED I/O — introducing a whole host of unnecessary pitfalls and awkward behaviors. However, the MSDN documentation here apparently describes a different piece of software. Though dx::pipes can be used for any communication between user space software its purpose is to allow Windows service communication. A service itself runs with elevated privileges, whereas the clients typically run in the normal user context. Therefore, the pipe servers have defined their default ACLs for non-privileged access.
More...
#include <dx_pipe.h>
|
| | dx_catchall_rethrow (, "%s: handle:%llx access:%x:%x:%x:%x", id.c_str(), handle, access[0], access[1], access[2], access[3]) void free() noexcept override |
| template<typename snd_t> |
| const snd_t & | operator<< (const snd_t &snd) |
| | pipe (const std::string &id, decltype(listen)&&listen={}, const ::DWORD(&access)[4]=access::dflt) |
| | pipe (const std::string &id, decltype(listen)::mapped_type &&listen, const ::DWORD(&access)[4]=access::dflt) |
| virtual void | read () noexcept try |
| void | run () try |
| ::ULONG | session () const |
| | ~pipe () override |
template<typename rcv_t>
class dx::pipe< rcv_t >
pipe - Windows named pipes A dx::pipe is a bidirection, multi-client, multi-threaded communication channel between a pipe client and a pipe server. Both pipe sides feature a dedicated read thread to receive data from the opposite side notifiying installable listener std::functions. On the service side, a pipe server is instantiated for each pipe client connection. Until a new client connects, the pipe::server::instance remains waiting in pipe::server::instance::connect within its dedicated pipe read thread. If a client disconnects the pipe::server::instance removes itself, terminating the read thread. The pipe::server::instance super class can be template-parameterized to allow mimicking user client behaviour. Windows arbitrarily serializes operations on synchronous pipe handles, limiting it's named pipe concurrent synchronous operation capabilities to exactly one synchronous pipe per process (i.e. exactly one per process), effectively forcing both the pipe::server and the pipe client to be implemented using asynchronous OVERLAPPED I/O — introducing a whole host of unnecessary pitfalls and awkward behaviors. However, the MSDN documentation here apparently describes a different piece of software. Though dx::pipes can be used for any communication between user space software its purpose is to allow Windows service communication. A service itself runs with elevated privileges, whereas the clients typically run in the normal user context. Therefore, the pipe servers have defined their default ACLs for non-privileged access.
◆ pipe() [1/2]
template<typename rcv_t>
| dx::pipe< rcv_t >::pipe |
( |
const std::string & | id, |
|
|
decltype(listen)&& | listen = {}, |
|
|
const ::DWORD(&) | access[4] = access::dflt ) |
|
inlineprotected |
◆ pipe() [2/2]
template<typename rcv_t>
| dx::pipe< rcv_t >::pipe |
( |
const std::string & | id, |
|
|
decltype(listen)::mapped_type && | listen, |
|
|
const ::DWORD(&) | access[4] = access::dflt ) |
|
inlineprotected |
◆ ~pipe()
◆ dx_catchall_rethrow() [1/2]
template<typename rcv_t>
|
|
inlineoverrideprotectednoexcept |
◆ dx_catchall_rethrow() [2/2]
template<
::HANDLE invalid_t = INVALID_HANDLE_VALUE>
◆ operator const os_event()
template<
::HANDLE invalid_t = INVALID_HANDLE_VALUE>
◆ operator os_event()
template<
::HANDLE invalid_t = INVALID_HANDLE_VALUE>
◆ operator::HANDLE()
template<::HANDLE invalid_t = INVALID_HANDLE_VALUE>
◆ operator<<()
template<typename rcv_t>
template<typename snd_t>
| const snd_t & dx::pipe< rcv_t >::operator<< |
( |
const snd_t & | snd | ) |
|
|
inlineprotected |
◆ read()
template<typename rcv_t>
| virtual void dx::pipe< rcv_t >::read |
( |
| ) |
|
|
inlineprotectedvirtualnoexcept |
◆ run()
◆ session()
template<typename rcv_t>
| ::ULONG dx::pipe< rcv_t >::session |
( |
| ) |
const |
|
inlineprotected |
◆ access
◆ handle
template<
::HANDLE invalid_t = INVALID_HANDLE_VALUE>
◆ id
◆ in
◆ out
◆ overlapped
◆ process
template<
::HANDLE invalid_t = INVALID_HANDLE_VALUE>
◆ sync
◆ thread
The documentation for this class was generated from the following file: