Binary

class Binary : 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.

Constructors

<init>

Binary(fin: Boolean, data: ByteArray)
Binary(fin: Boolean, packet: ByteReadPacket)
Binary(fin: Boolean, buffer: ByteBuffer)
Binary(
    fin: Boolean,
    data: ByteArray,
    rsv1: Boolean = false,
    rsv2: Boolean = false,
    rsv3: Boolean = false)

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.

Inherited Properties

buffer

val buffer: ByteBuffer

Frame content

data

val data: ByteArray
  • a frame content or fragment content

disposableHandle

val disposableHandle: DisposableHandle

could be invoked when the frame is processed

fin

val fin: Boolean

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

frameType

val frameType: FrameType

enum value

rsv1

val rsv1: Boolean

First extension bit.

rsv2

val rsv2: Boolean

Second extension bit.

rsv3

val rsv3: Boolean

Third extension bit.

Inherited Functions

copy

fun copy(): Frame

Creates a frame copy

toString

open fun toString(): String