WebsocketConnection


Description:

[ CCode ( has_construct_function = false ) ]
public WebsocketConnection (IOStream stream, URI uri, WebsocketConnectionType type, string? origin, string? protocol)

Creates a [class@WebsocketConnection] on stream with the given active extensions.

This should be called after completing the handshake to begin using the WebSocket protocol.

Parameters:

stream

a IOStream connected to the WebSocket server

uri

the URI of the connection

type

the type of connection (client/side)

origin

the Origin of the client

protocol

the subprotocol in use

extensions

a List of WebsocketExtension objects

Returns:

a new WebsocketConnection