Factory

class Factory @JvmOverloads constructor(connectionAcknowledgeTimeoutMs: Long, connectionPayload: suspend () -> Map<String, Any?>? = { null }, frameType: WsFrameType = WsFrameType.Text) : WsProtocol.Factory

A factory for SubscriptionWsProtocol.

Parameters

connectionAcknowledgeTimeoutMs

the timeout for receiving the "connection_ack" message, in milliseconds

connectionPayload

a map of additional parameters to send in the "connection_init" message

frameType

the type of the websocket frames to use. Default value: WsFrameType.Text

Constructors

Link copied to clipboard
constructor(connectionAcknowledgeTimeoutMs: Long, connectionPayload: suspend () -> Map<String, Any?>? = { null }, frameType: WsFrameType = WsFrameType.Text)

Properties

Link copied to clipboard
open override val name: String

The name of the protocol as in the Sec-WebSocket-Protocol header

Functions

Link copied to clipboard
open override fun create(webSocketConnection: WebSocketConnection, listener: WsProtocol.Listener, scope: CoroutineScope): WsProtocol

Create a WsProtocol