Skip to main content

WebsocketConnectionOptions

Type Alias WebsocketConnectionOptions 

Source
pub type WebsocketConnectionOptions = WebSocketConnectionOptions;

Aliased Type§

pub struct WebsocketConnectionOptions {
    pub extensions: Option<Vec<Value>>,
    pub subprotocols: Option<Vec<Value>>,
    pub compression: Option<String>,
    pub max_size: Option<i64>,
    pub max_queue: Option<Value>,
    pub write_limit: Option<Value>,
}

Fields§

§extensions: Option<Vec<Value>>

List of supported extensions, in order in which they should be negotiated and run.

§subprotocols: Option<Vec<Value>>

List of supported subprotocols, in order of decreasing preference.

§compression: Option<String>

The “permessage-deflate” extension is enabled by default. Set compression to None to disable it. See the compression guide for details.

§max_size: Option<i64>

Maximum size of incoming messages in bytes. None disables the limit.

§max_queue: Option<Value>

High-water mark of the buffer where frames are received. It defaults to 16 frames. The low-water mark defaults to max_queue // 4. You may pass a (high, low) tuple to set the high-water and low-water marks. If you want to disable flow control entirely, you may set it to None, although that’s a bad idea.

§write_limit: Option<Value>

High-water mark of write buffer in bytes. It is passed to set_write_buffer_limits(). It defaults to 32 KiB. You may pass a (high, low) tuple to set the high-water and low-water marks.