|
dxd - dynax driver framework 3.0.1d223
cross platform open source driver development framework
|
#include "dx_sync.h"#include "dx_common.h"#include <functional>#include <mutex>#include <stop_token>Classes | |
| 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 terminates its read thread and is joined and released by the next pipe::server::run() or pipe::server::stop(). 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... | |
| struct | dx::pipe< rcv_t >::access |
| how a client opens the pipe where the caller names nothing: read and write, overlapped More... | |
| class | dx::pipe< rcv_t >::connection |
| whether this pipe stands: an event to wait on and a promoted to follow - dx::pipe::status derives it from what the last operation answered More... | |
| class | dx::pipe< rcv_t >::server< instance_t, arg_t > |
| server - accepts multiple concurrent pipe client connections Each accepted connection is served by its own pipe::server::instance, running on a dedicated read thread. run() keeps exactly one instance listening for the next client at all times: once ConnectNamedPipe() accepts a connection, that instance's own thread calls server::run() again - reaping already-concluded instances and spawning the next listener - before servicing its own connection. A concluded instance (client disconnected) therefore joins only at the start of the next run(), on a different thread: a std::jthread cannot join itself, so reaping cannot happen from within the concluding instance's own read thread. An otherwise idle server thus keeps its most recently used instance around until either the next connection or stop(), which unconditionally joins every instance - connected or not - synchronously before returning. More... | |
| struct | dx::pipe< rcv_t >::server< instance_t, arg_t >::access |
| how the pipe is created where the caller names nothing: a duplex message pipe, overlapped More... | |
| class | dx::pipe< rcv_t >::server< instance_t, arg_t >::instance |
| one accepted client connection, on a read thread of its own More... | |
| class | dx::pipe< rcv_t >::status |
| every pipe operation's result assigned here: the states that mean the peer is gone end the read thread, ok marks the connection up, the pending ones pass, and anything else is a fault More... | |
Namespaces | |
| namespace | dx |
| dynax driver framework interface namespace | |
Typedefs | |
| typedef promoted | super |
Functions | |
| super & | operator= (::BOOL value) |
| super & | operator= (::HANDLE value) |
| typedef promoted super |
| super & this::operator= | ( | ::BOOL | value | ) |
| super & this::operator= | ( | ::HANDLE | value | ) |
| (c) copyright 2009 dynamic acoustics e.U. | generated on |