libpalliate v0.0.1
Palliate core library
RPC::Server Class Reference

#include <server.h>

Inheritance diagram for RPC::Server:

Public Member Functions

 Server (Key)
 
virtual ~Server () noexcept
 
void broadcast (capnp::MessageBuilder *message)
 
- Public Member Functions inherited from runnable
 runnable (std::string const &_name)
 
virtual ~runnable ()
 
virtual void operator() (std::stop_token token={})
 
void run ()
 
void run (callback_f _callback)
 
void stop ()
 
auto operator<=> (runnable const &other) const
 

Protected Member Functions

void accept (kj::Own< kj::ConnectionReceiver > &&listener)
 
void remove (Context const *ptr)
 
kj::Promise< void > authenticate (kj::AuthenticatedStream &&connection)
 
- Protected Member Functions inherited from runnable
virtual bool setup ()
 
virtual bool loop ()=0
 

Protected Attributes

capnp::Capability::Client interface { nullptr }
 
Authentication::Authenticator * authenticator
 
std::list< kj::Own< Context > > contexts {}
 
kj::Own< RPC::IOio
 
- Protected Attributes inherited from runnable
std::jthread thread
 
std::unique_ptr< callback_tcallback
 

Additional Inherited Members

- Public Types inherited from runnable
using callback_f = std::function< void()>
 
using callback_t = std::stop_callback< callback_f >
 

Constructor & Destructor Documentation

◆ Server()

RPC::Server::Server ( Key  )
inlineexplicit

◆ ~Server()

virtual RPC::Server::~Server ( )
inlinevirtualnoexcept

Member Function Documentation

◆ accept()

void Server::accept ( kj::Own< kj::ConnectionReceiver > &&  listener)
protected

◆ authenticate()

kj::Promise< void > Server::authenticate ( kj::AuthenticatedStream &&  connection)
protected

◆ broadcast()

void Server::broadcast ( capnp::MessageBuilder *  message)

◆ remove()

void Server::remove ( Context const *  ptr)
protected

Member Data Documentation

◆ authenticator

Authentication::Authenticator* RPC::Server::authenticator
protected

◆ contexts

std::list<kj::Own<Context> > RPC::Server::contexts {}
protected

◆ interface

capnp::Capability::Client RPC::Server::interface { nullptr }
protected

◆ io

kj::Own<RPC::IO> RPC::Server::io
protected

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