macOS: a service's listener - a launchd mach service, or an anonymous one below it (dx::service::endpoints) - a peer per client connection
More...
|
| void | run() |
| void | run() |
| | server(const server &)= delete |
| | server(const server &)= delete |
| | server(const std::string& id, std::function<std::shared_ptr<peer>(uint32_t pid)>&& create, const std::string& requirement= {}) |
| | a server under the mach service's name, anonymous where none is named or the id names a part below a service
|
| | server(const std::string& id, std::function<std::shared_ptr<peer>(uint32_t pid)>&& create, const std::string& requirement= {}) |
| void | signal() noexcept |
| | the broadcast: every peer's client reads back what it mirrors
|
| void | signal() noexcept |
| | the broadcast: every connected client reads back what it mirrors
|
| void | stop() noexcept |
| | every connection cancelled, its peer's requests run out and the peer destroyed - the listener with them
|
| void | stop() noexcept |
| | every instance ended and joined - its peer destroyed with it
|
| | ~server() |
| | ~server() |
macOS: a service's listener - a launchd mach service, or an anonymous one below it (dx::service::endpoints) - a peer per client connection
Windows: a service's named pipe, a peer per client connection.
Every peer runs on a serial queue of its own: a request waiting on its device holds up no other client. A peer's connection ending destroys it on that queue; stop() cancels every connection and destroys every peer before it returns. A requirement admits only the peers whose code signature satisfies it, none admits every peer - each one untrusted.
One instance always listens; a connected one starts the next and serves its client on its own thread - a request waiting on its device holds up no other client. A connection's end destroys its peer on that thread; stop() ends every instance and so destroys every peer before it returns. The pipe takes local clients alone, every user's (the descriptor's empty DACL) - each one untrusted; Windows has no code signing requirement (requirement unused).