EngineIO

The Engine.IO decoder, following the Engine.IO protocol.

Functions

Link copied to clipboard
fun <T> decodeHttpBatch(batch: String, deserializeTextPayload: (String) -> T, deserializeBinaryPayload: (ByteString) -> T = { deserializeTextPayload(it.decodeToString()) }): List<EngineIOPacket<T>>

Decodes the given batch text as a batch of EngineIOPackets.

Link copied to clipboard

Decodes the given textFrame as a single EngineIOPacket.

Link copied to clipboard
fun <T> decodeWsFrame(text: String, deserializePayload: (String) -> T): EngineIOPacket<T>

Decodes the given web socket text frame as a single EngineIOPacket.

fun <T> decodeWsFrame(bytes: ByteString, deserializePayload: (ByteString) -> T): EngineIOPacket.Message<T>

Decodes the given binary web socket frame's bytes as a single EngineIOPacket.Message.