SocketIOPacket

sealed class SocketIOPacket(source)

A Socket.IO packet, as defined in the Socket.IO protocol.

Exact payload types can be checked against the reference implementation.

Inheritors

Types

Link copied to clipboard
data class Ack(val namespace: String, val ackId: Int, val payload: JsonArray) : SocketIOPacket.Message

Used to acknowledge the event with the corresponding ackId.

Link copied to clipboard
data class Connect(val namespace: String, val payload: JsonObject?) : SocketIOPacket

Used during the connection to a namespace.

Link copied to clipboard
data class ConnectError(val namespace: String, val errorData: JsonElement?) : SocketIOPacket

Used during the connection to a namespace.

Link copied to clipboard
data class Disconnect(val namespace: String) : SocketIOPacket

Used when disconnecting from a namespace.

Link copied to clipboard
data class Event(val namespace: String, val ackId: Int?, val payload: JsonArray) : SocketIOPacket.Message

Used to send data to the other side.

Link copied to clipboard
sealed class Message : SocketIOPacket

A parent for packet types having a payload.

Properties

Link copied to clipboard
abstract val namespace: String

The namespace this packet belongs to, useful when multiplexing. The default namespace is "/".