CloseReason

data class CloseReason

Websocket close reason

Types

Codes

enum class Codes

Standard close reason codes

Constructors

<init>

CloseReason(code: Codes, message: String)
CloseReason(code: Short, message: String)

Websocket close reason

Properties

code

val code: Short

knownReason

val knownReason: Codes?

A enum value for this code or null if the code is not listed in Codes

message

val message: String
  • a close reason message, could be empty

Functions

toString

fun toString(): String