decode

fun decode(encodedData: String): SocketIOPacket(source)

Decodes the given encodedData into a SocketIOPacket.

The encodedData must be the pure Socket.IO packet data, not wrapped in an Engine.IO packet.

Binary packet types are not supported. Binary attachments are passed in subsequent web socket frames (1 frame per attachment), and thus cannot be handled in this single-frame decoding function.

Throws

if the given encodedData is not a valid Socket.IO packet