WebSocketTransport

actual class WebSocketTransport : WebSocketTransportCommon
expect class WebSocketTransport(url: URL, decode: DecodeClosure) : WebSocketTransportCommon

A WebSocket implementation of a Transport that uses a WebSocket to facilitate sending and receiving data.

actual class WebSocketTransport : WebSocketTransportCommon

Parameters

url

: URL to connect to

Constructors

Link copied to clipboard
expect fun WebSocketTransport(url: URL, decode: DecodeClosure)

Functions

Link copied to clipboard
open override fun connect(): SocketFlow

Connect to the server

abstract fun connect(): SocketFlow

Connect to the server

open override fun connect(): SocketFlow

Connect to the server

Link copied to clipboard
open override fun disconnect(code: Int, reason: String?)

Disconnect from the Server

abstract fun disconnect(code: Int, reason: String? = null)

Disconnect from the Server

open override fun disconnect(code: Int, reason: String?)

Disconnect from the Server

Link copied to clipboard
open override fun send(data: String)

Sends text to the Server

abstract fun send(data: String)

Sends text to the Server

open override fun send(data: String)

Sends text to the Server

Properties

Link copied to clipboard
actual val decode: DecodeClosure
expect val decode: DecodeClosure
actual val decode: DecodeClosure
Link copied to clipboard
open override var readyState: Transport.ReadyState

The state of the Transport. See {@link ReadyState}

Link copied to clipboard
open override var readyState: Transport.ReadyState

The state of the Transport. See {@link ReadyState}

Link copied to clipboard
open override var readyState: Transport.ReadyState

The state of the Transport. See {@link ReadyState}

Link copied to clipboard
actual val url: URL
expect val url: URL
actual val url: URL