[−][src]Struct jsonrpc_ws_server::Server
WebSockets server implementation.
Methods
impl Server[src]
pub fn addr(&self) -> &SocketAddr[src]
Returns the address this server is listening on
pub fn broadcaster(&self) -> Broadcaster[src]
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
) -> Result<Server>[src]
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
) -> Result<Server>
Starts a new WebSocket server in separate thread.
Returns a Server handle which closes the server when droped.
impl Server[src]
pub fn wait(self) -> Result<()>[src]
Consumes the server and waits for completion
pub fn close(self)[src]
Closes the server and waits for it to finish
pub fn close_handle(&self) -> CloseHandle[src]
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 Sync for Server
impl Send for Server
impl Unpin for Server
impl !RefUnwindSafe for Server
impl !UnwindSafe for Server
Blanket Implementations
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Erased for T
impl<T> Same<T> for T
type Output = T
Should always be Self