Function

Soup-3.0Soupwebsocket_client_prepare_handshake

  • Adds the necessary headers to msg to request a WebSocket handshake including supported WebSocket extensions.

    The message body and non-WebSocket-related headers are not modified.

    This is a low-level function; if you use Session.websocket_connect_async to create a WebSocket connection, it will call this for you.

    Parameters

    • msg: Soup.Message
    • Optionalorigin: string

      the "Origin" header to set

    • Optionalprotocols: string[]

      list of protocols to offer

    • Optionalsupported_extensions: TypeClass[]

      list of supported extension types

    Returns void