Config

class Config
_max_queue_size: number or nil
_max_frame_size: number
_max_message_size: number
_accept_unmasked_frames: boolean
extensions: list[table]
protocols: list[str]
_keep_alive: number or nil
static default()

Construct a default configurations

Return type

Config

max_queue_size(size)

Set the max message queue size

Parameters

size (number or nil) –

Return type

Config

max_message_size(size)

Set the max message size (Default 64mb)

Parameters

size (number or nil) –

Return type

Config

max_frame_size(size)

Set the max frame size (Default 16mb)

Parameters

size (number or nil) –

Return type

Config

max_frames_without_pong(size)

Set the max frames that can be received while waiting for a pong (Default 4)

Parameters

size (number or nil) –

Return type

Config

extension(name, params)

Add an entry to the enabled extensions

Parameters
  • name (str) –

  • params (list[str]) –

Return type

Config

protocol(name)

Add an entry to the enabled protocols

Parameters

name (str) –

Return type

Config

keep_alive(timeout)

Set the keep alive value in number of seconds. This will control

how often an idle websocket will send a “ping” frame

Parameters

timeout (any) –

Return type

Config