takeBinaryData method
dynamic
takeBinaryData(
- dynamic binData
Method to be called when binary data received from connection after a BINARY_EVENT packet.
@param {Buffer | ArrayBuffer} binData - the raw binary data received @return {null | Object} returns null if more binary data is expected or a reconstructed packet object if all buffers have been received. @api private
Implementation
takeBinaryData(binData) {
this.buffers.add(binData);
if (this.buffers.length == this.reconPack!['attachments']) {
// done with buffer list
var packet = Binary.reconstructPacket(
this.reconPack!, this.buffers.cast<List<int>>());
this.finishedReconstruction();
return packet;
}
return null;
}