decode Ws Frame
Decodes the given web socket text frame as a single EngineIOPacket.
If this packet is a EngineIOPacket.Message packet, the payload text is deserialized using the provided deserializePayload function.
This is meant to be used in web socket mode, where each web socket frame contains a single Engine.IO packet. When using HTTP long-polling with batched packets, use decodeHttpBatch instead.
Decodes the given binary web socket frame's bytes as a single EngineIOPacket.Message.
As specified by the protocol, binary messages are just sent as-is, so there is no real decoding involved in this function, it just wraps the bytes in a packet type for consistency.
This is meant to be used in web socket mode, where each web socket frame contains a single Engine.IO packet. When using HTTP long-polling with batched packets, use decodeHttpBatch instead.