Frame

expect sealed class Frame

A frame received or ready to be sent. It is not reusable and not thread-safe.

actual sealed class Frame

A frame received or ready to be sent. It is not reusable and not thread-safe

actual sealed class Frame

A frame received or ready to be sent. It is not reusable and not thread-safe

actual sealed class Frame

A frame received or ready to be sent. It is not reusable and not thread-safe

Types

Link copied to clipboard
expect class Binary(fin: Boolean, data: ByteArray, rsv1: Boolean = false, rsv2: Boolean = false, rsv3: Boolean = false) : Frame

Represents an application level binary frame. In a RAW WebSocket session a big text frame could be fragmented (separated into several text frames, so they have fin = false except the last one). Note that usually there is no need to handle fragments unless you have a RAW web socket session.

actual class Binary(val fin: Boolean, val data: ByteArray, val rsv1: Boolean, val rsv2: Boolean, val rsv3: Boolean) : Frame

Represents an application level binary frame. In a RAW web socket session a big text frame could be fragmented (separated into several text frames so they have fin = false except the last one). Note that usually there is no need to handle fragments unless you have a RAW web socket session.

actual class Binary(val fin: Boolean, val data: ByteArray, val rsv1: Boolean, val rsv2: Boolean, val rsv3: Boolean) : Frame

Represents an application level binary frame. In a RAW web socket session a big text frame could be fragmented (separated into several text frames so they have fin = false except the last one). Note that usually there is no need to handle fragments unless you have a RAW web socket session.

actual class Binary(val fin: Boolean, val data: ByteArray, val rsv1: Boolean, val rsv2: Boolean, val rsv3: Boolean) : Frame

Represents an application level binary frame. In a RAW web socket session a big text frame could be fragmented (separated into several text frames so they have fin = false except the last one). Note that usually there is no need to handle fragments unless you have a RAW web socket session.

Link copied to clipboard
expect class Close(data: ByteArray) : Frame

Represents a low-level level close frame. It could be sent to indicate WebSocket session end. Usually there is no need to send/handle it unless you have a RAW WebSocket session.

actual class Close(val data: ByteArray) : Frame

Represents a low-level level close frame. It could be sent to indicate web socket session end. Usually there is no need to send/handle it unless you have a RAW web socket session.

actual class Close(val data: ByteArray) : Frame

Represents a low-level level close frame. It could be sent to indicate web socket session end. Usually there is no need to send/handle it unless you have a RAW web socket session.

actual class Close(val data: ByteArray) : Frame

Represents a low-level level close frame. It could be sent to indicate web socket session end. Usually there is no need to send/handle it unless you have a RAW web socket session.

Link copied to clipboard
expect object Companion
actual object Companion
actual object Companion
actual object Companion
Link copied to clipboard
expect class Ping(data: ByteArray) : Frame

Represents a low-level ping frame. Could be sent to test connection (peer should reply with Pong). Usually there is no need to send/handle it unless you have a RAW WebSocket session.

actual class Ping(val data: ByteArray) : Frame

Represents a low-level ping frame. Could be sent to test connection (peer should reply with Pong). Usually there is no need to send/handle it unless you have a RAW web socket session.

actual class Ping(val data: ByteArray) : Frame

Represents a low-level ping frame. Could be sent to test connection (peer should reply with Pong). Usually there is no need to send/handle it unless you have a RAW web socket session.

actual class Ping(val data: ByteArray) : Frame

Represents a low-level ping frame. Could be sent to test connection (peer should reply with Pong). Usually there is no need to send/handle it unless you have a RAW web socket session.

Link copied to clipboard
expect class Pong(data: ByteArray, disposableHandle: DisposableHandle = NonDisposableHandle) : Frame

Represents a low-level pong frame. Should be sent in reply to a Ping frame. Usually there is no need to send/handle it unless you have a RAW WebSocket session.

actual class Pong(val data: ByteArray, val disposableHandle: DisposableHandle) : Frame

Represents a low-level pong frame. Should be sent in reply to a Ping frame. Usually there is no need to send/handle it unless you have a RAW web socket session.

actual class Pong(val data: ByteArray, val disposableHandle: DisposableHandle) : Frame

Represents a low-level pong frame. Should be sent in reply to a Ping frame. Usually there is no need to send/handle it unless you have a RAW web socket session.

actual class Pong(val data: ByteArray, val disposableHandle: DisposableHandle) : Frame

Represents a low-level pong frame. Should be sent in reply to a Ping frame. Usually there is no need to send/handle it unless you have a RAW web socket session.

Link copied to clipboard
expect class Text(fin: Boolean, data: ByteArray, rsv1: Boolean = false, rsv2: Boolean = false, rsv3: Boolean = false) : Frame

Represents an application level text frame. In a RAW WebSocket session a big text frame could be fragmented (separated into several text frames, so they have fin = false except the last one). Please note that a boundary between fragments could be in the middle of multi-byte (unicode) character so don't apply String constructor to every fragment but use decoder loop instead of concatenate fragments first. Note that usually there is no need to handle fragments unless you have a RAW web socket session.

actual class Text(val fin: Boolean, val data: ByteArray, val rsv1: Boolean, val rsv2: Boolean, val rsv3: Boolean) : Frame

Represents an application level text frame. In a RAW web socket session a big text frame could be fragmented (separated into several text frames so they have fin = false except the last one). Please note that a boundary between fragments could be in the middle of multi-byte (unicode) character so don't apply String constructor to every fragment but use decoder loop instead of concatenate fragments first. Note that usually there is no need to handle fragments unless you have a RAW web socket session.

actual class Text(val fin: Boolean, val data: ByteArray, val rsv1: Boolean, val rsv2: Boolean, val rsv3: Boolean) : Frame

Represents an application level text frame. In a RAW web socket session a big text frame could be fragmented (separated into several text frames so they have fin = false except the last one). Please note that a boundary between fragments could be in the middle of multi-byte (unicode) character so don't apply String constructor to every fragment but use decoder loop instead of concatenate fragments first. Note that usually there is no need to handle fragments unless you have a RAW web socket session.

actual class Text(val fin: Boolean, val data: ByteArray, val rsv1: Boolean, val rsv2: Boolean, val rsv3: Boolean) : Frame

Represents an application level text frame. In a RAW web socket session a big text frame could be fragmented (separated into several text frames so they have fin = false except the last one). Please note that a boundary between fragments could be in the middle of multi-byte (unicode) character so don't apply String constructor to every fragment but use decoder loop instead of concatenate fragments first. Note that usually there is no need to handle fragments unless you have a RAW web socket session.

Functions

Link copied to clipboard
expect fun copy(): Frame

Creates a frame copy.

actual fun copy(): Frame

Creates a frame copy.

actual fun copy(): Frame

Creates a frame copy.

actual fun copy(): Frame

Creates a frame copy.

Link copied to clipboard
open override fun toString(): String
open override fun toString(): String
open override fun toString(): String

Properties

Link copied to clipboard

Frame content

Link copied to clipboard
expect val data: ByteArray
actual val data: ByteArray
actual val data: ByteArray
actual val data: ByteArray
Link copied to clipboard
expect val disposableHandle: DisposableHandle

could be invoked when the frame is processed

actual val disposableHandle: DisposableHandle

could be invoked when the frame is processed

actual val disposableHandle: DisposableHandle

could be invoked when the frame is processed

actual val disposableHandle: DisposableHandle

could be invoked when the frame is processed

Link copied to clipboard
expect val fin: Boolean

is it final fragment, should be always true for control frames and if no fragmentation is used

actual val fin: Boolean

is it final fragment, should be always true for control frames and if no fragmentation is used

actual val fin: Boolean

is it final fragment, should be always true for control frames and if no fragmentation is used

actual val fin: Boolean

is it final fragment, should be always true for control frames and if no fragmentation is used

Link copied to clipboard
expect val frameType: FrameType

enum value

actual val frameType: FrameType

enum value

actual val frameType: FrameType

enum value

actual val frameType: FrameType

enum value

Link copied to clipboard
expect val rsv1: Boolean

First extension bit.

actual val rsv1: Boolean
actual val rsv1: Boolean
actual val rsv1: Boolean
Link copied to clipboard
expect val rsv2: Boolean

Second extension bit.

actual val rsv2: Boolean
actual val rsv2: Boolean
actual val rsv2: Boolean
Link copied to clipboard
expect val rsv3: Boolean

Third extension bit.

actual val rsv3: Boolean
actual val rsv3: Boolean
actual val rsv3: Boolean

Inheritors

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Extensions

Link copied to clipboard

Reads binary content from the frame. For fragmented frames only returns this fragment.