Text

@Serializable
data class Text(val direction: WebSocketDirection, val time: Instant, val opcode: Int, val data: String) : HarWebSocketMessage(source)

Constructors

Link copied to clipboard
constructor(direction: WebSocketDirection, time: Instant, opcode: Int, data: String)

Properties

Link copied to clipboard

The text payload of this message (UTF-8 decoded).

Link copied to clipboard
@SerialName(value = "type")
open override val direction: WebSocketDirection

Which way the message was sent on the web socket.

Link copied to clipboard
open override val opcode: Int

The opcode of the websocket frame (1 for a text frame, 2 for a binary frame).

Link copied to clipboard
@Serializable(with = InstantAsDoubleSecondsSerializer::class)
open override val time: Instant

The instant when the message was sent.