Factory

class Factory(connectionAcknowledgeTimeoutMs: Long, connectionPayload: suspend () -> Map<String, Any?>? = { null }) : WsProtocol.Factory

Parameters

connectionPayload

: a function generating a map containing the authorization information. For an example:

mapOf(
"host" to "example1234567890000.appsync-api.us-east-1.amazonaws.com",
"x-api-key" to "da2-12345678901234567890123456"
)

Constructors

Link copied to clipboard
fun Factory(authorization: Map<String, Any?>, connectionAcknowledgeTimeoutMs: Long)
Link copied to clipboard
fun Factory(connectionAcknowledgeTimeoutMs: Long, connectionPayload: suspend () -> Map<String, Any?>? = { null })

Functions

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

Create a WsProtocol

Properties

Link copied to clipboard
open override val name: String

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