dxd - dynax driver framework 3.0.2
cross platform open source driver development framework
Loading...
Searching...
No Matches
dx::service::server Class Reference

macOS: a service's listener - a launchd mach service, or an anonymous one below it (dx::service::endpoints) - a peer per client connection More...

#include <dx_service_transport.h>

Public Member Functions

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()

Detailed Description

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).

Constructor & Destructor Documentation

◆ server() [1/4]

dx::service::server::server(const std::string& id, std::function<std::shared_ptr<peer>(uint32_t pid)>&& create, const std::string& requirement= {})
inline

a server under the mach service's name, anonymous where none is named or the id names a part below a service

Here is the caller graph for this function:

◆ server() [2/4]

dx::service::server::server(const server&)
delete
Here is the call graph for this function:

◆ ~server() [1/2]

dx::service::server::~server()
inline
Here is the call graph for this function:

◆ server() [3/4]

dx::service::server::server(const std::string& id, std::function<std::shared_ptr<peer>(uint32_t pid)>&& create, const std::string& requirement= {})
inline
Here is the call graph for this function:

◆ server() [4/4]

dx::service::server::server(const server&)
delete
Here is the call graph for this function:

◆ ~server() [2/2]

dx::service::server::~server()
inline
Here is the call graph for this function:

Member Function Documentation

◆ run() [1/2]

void dx::service::server::run()
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ run() [2/2]

void dx::service::server::run()
inline

◆ signal() [1/2]

void dx::service::server::signal()
inlinenoexcept

the broadcast: every peer's client reads back what it mirrors

Here is the caller graph for this function:

◆ signal() [2/2]

void dx::service::server::signal()
inlinenoexcept

the broadcast: every connected client reads back what it mirrors

◆ stop() [1/2]

void dx::service::server::stop()
inlinenoexcept

every connection cancelled, its peer's requests run out and the peer destroyed - the listener with them

Here is the call graph for this function:
Here is the caller graph for this function:

◆ stop() [2/2]

void dx::service::server::stop()
inlinenoexcept

every instance ended and joined - its peer destroyed with it


The documentation for this class was generated from the following files: