C++ Actor Framework 0.19
|
Factory type for the with(...).accept(...).start(...)
DSL.
More...
#include <server_factory.hpp>
Public Types | |
using | super = dsl::server_factory_base< server_config< Trait >, server_factory< Trait > > |
using | config_type = typename super::config_type |
using | on_request_cb_type = shared_callback_ptr< void(acceptor< Ts... > &)> |
using | input_type = typename Trait::input_type |
The input type of the application, i.e., what that flows from the WebSocket to the application layer. | |
using | output_type = typename Trait::output_type |
The output type of the application, i.e., what flows from the application layer to the WebSocket. | |
using | input_resource = async::consumer_resource< input_type > |
A resource for consuming input_type elements. | |
using | output_resource = async::producer_resource< output_type > |
A resource for producing output_type elements. | |
using | accept_event = cow_tuple< input_resource, output_resource, Ts... > |
An accept event from the server to transmit read and write handles. | |
using | acceptor_resource = async::consumer_resource< accept_event > |
A resource for consuming accept events. | |
![]() | |
using | config_type = server_config< Trait > |
using | config_pointer = intrusive_ptr< config_type > |
Public Member Functions | |
server_factory (intrusive_ptr< config_type > cfg, on_request_cb_type on_request) | |
template<class OnStart > | |
expected< disposable > | start (OnStart on_start) |
Starts a server that accepts incoming connections with the WebSocket protocol. | |
![]() | |
server_factory_base (server_factory_base &&)=default | |
server_factory_base (const server_factory_base &)=default | |
server_factory_base (config_pointer cfg) | |
server_factory_base (dsl::server_config_tag< T > token, Ts &&... xs) | |
server_factory_base & | operator= (server_factory_base &&)=default |
server_factory_base & | operator= (const server_factory_base &)=default |
server_factory< Trait > & | do_on_error (F callback) |
Sets the callback for errors. | |
server_factory< Trait > & | max_connections (size_t value) |
Configures how many concurrent connections the server accepts. | |
server_factory< Trait > & | reuse_address (bool value) |
Configures whether the server creates its socket with SO_REUSEADDR . | |
config_type & | config () |
Additional Inherited Members | |
![]() | |
server_factory< Trait > & | dref () |
![]() | |
config_pointer | cfg_ |
Factory type for the with(...).accept(...).start(...)
DSL.