encodeBase64Packet static method

dynamic encodeBase64Packet(
  1. dynamic packet,
  2. dynamic callback
)

Implementation

static encodeBase64Packet(packet, callback) {
  var message = '''b${packetTypeMap[packet['type']]}''';
  message += base64.encode(packet.data.toString().codeUnits);
  return callback(message);
}