Struct actix_web::ws::Client

source ·
pub struct Client { /* private fields */ }
Expand description

WebSocket client

Example of WebSocket client usage is available in websocket example

Implementations

Create new websocket connection

Create new websocket connection with custom ClientConnector

Set supported websocket protocols

Set cookie for handshake request

Set request Origin

Set max frame size

By default max size is set to 64kb

Set write buffer capacity

Default buffer capacity is 32kb

Disable payload masking. By default ws client masks frame payload.

Set request header

Set websocket handshake timeout

Handshake timeout is a total time for successful handshake. Default value is 5 seconds.

Connect to websocket server and do ws handshake

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.