decodePayload static method
dynamic
decodePayload(
- dynamic encodedPayload,
- dynamic binaryType
Implementation
static decodePayload(encodedPayload, binaryType) {
var encodedPackets = encodedPayload.split(SEPARATOR);
var packets = [];
for (var i = 0; i < encodedPackets.length; i++) {
var decodedPacket = decodePacket(encodedPackets[i], binaryType);
packets.add(decodedPacket);
if (decodedPacket['type'] == "error") {
break;
}
}
return packets;
}