decodeBatch

fun <T> decodeBatch(batch: String, deserializePayload: (String) -> T): List<EngineIOPacket<T>>(source)

Decodes the given batch text as a batch of EngineIOPackets.

If a packet is a EngineIOPacket.Message packet, the payload text is deserialized using the provided deserializePayload function.

This is meant to be used in long-polling mode, where packets are batched in a single response. When using web sockets, use decodeFrame instead.