Struct actix_web::ws::Client[][src]

pub struct Client { /* fields omitted */ }

WebSocket client

Example of WebSocket client usage is available in websocket example

Methods

impl Client
[src]

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

impl !Send for Client

impl !Sync for Client