Struct jsonrpc_ws_server::Server [−][src]
pub struct Server { /* fields omitted */ }
Expand description
WebSockets
server implementation.
Implementations
Returns the address this server is listening on
Returns a Broadcaster that can be used to send messages on all connections.
pub fn start<M: Metadata, S: Middleware<M>>(
addr: &SocketAddr,
handler: Arc<MetaIoHandler<M, S>>,
meta_extractor: Arc<dyn MetaExtractor<M>>,
allowed_origins: Option<Vec<Origin>>,
allowed_hosts: Option<Vec<Host>>,
request_middleware: Option<Arc<dyn RequestMiddleware>>,
stats: Option<Arc<dyn SessionStats>>,
executor: UninitializedExecutor,
max_connections: usize,
max_payload_bytes: usize,
max_in_buffer_capacity: usize,
max_out_buffer_capacity: usize
) -> Result<Server> where
S::Future: Unpin,
S::CallFuture: Unpin,
[src]
pub fn start<M: Metadata, S: Middleware<M>>(
addr: &SocketAddr,
handler: Arc<MetaIoHandler<M, S>>,
meta_extractor: Arc<dyn MetaExtractor<M>>,
allowed_origins: Option<Vec<Origin>>,
allowed_hosts: Option<Vec<Host>>,
request_middleware: Option<Arc<dyn RequestMiddleware>>,
stats: Option<Arc<dyn SessionStats>>,
executor: UninitializedExecutor,
max_connections: usize,
max_payload_bytes: usize,
max_in_buffer_capacity: usize,
max_out_buffer_capacity: usize
) -> Result<Server> where
S::Future: Unpin,
S::CallFuture: Unpin,
[src]Starts a new WebSocket
server in separate thread.
Returns a Server
handle which closes the server when droped.
Returns a handle to the server that can be used to close it while another thread is
blocking in wait
.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Server
impl !UnwindSafe for Server