libpalliate v0.0.1
Palliate core library
|
#include <server.h>
Public Member Functions | |
Server (const char *_host, unsigned _port, bool _packed=false) | |
bool | loop () override |
![]() | |
~Server () override=default | |
Server (std::string const &_name, bool _packed=false) | |
virtual builder_t | prepare () |
void | broadcast (capnp::MessageBuilder *message) |
void | set_event (std::function< void(Client *, reader_t)> message_event) |
void | add (std::unique_ptr< Client > clientobj) |
void | remove (Client *obj) |
![]() | |
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 |
Additional Inherited Members | |
![]() | |
using | callback_f = std::function< void()> |
using | callback_t = std::stop_callback< callback_f > |
![]() | |
virtual bool | setup () |
virtual bool | loop ()=0 |
![]() | |
std::list< std::unique_ptr< Client > > | clients |
std::mutex | clients_mutex |
bool | packed |
std::function< void(Client *, reader_t)> | message_event |
![]() | |
std::jthread | thread |
std::unique_ptr< callback_t > | callback |
Server::Server | ( | const char * | _host, |
unsigned | _port, | ||
bool | _packed = false |
||
) |
|
overridevirtual |
Implements runnable.