pub struct ServerBuilder<M: Metadata, S: Middleware<M>> { /* private fields */ }
Expand description

Builder for WebSockets server

Implementations

Creates new ServerBuilder

Creates new ServerBuilder

Utilize existing event loop executor to poll RPC results.

Sets a meta extractor.

Allowed origins.

Allowed hosts.

Session stats

Sets a request middleware. Middleware will be invoked before each handshake request. You can either terminate the handshake in the middleware or run a default behaviour after.

Maximal number of concurrent connections this server supports. Default: 100

Maximal size of the payload (in bytes) Default: 5MB

Starts a new WebSocket server in separate thread. Returns a Server handle which closes the server when droped.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.