send method

Future<void> send(
  1. String type,
  2. Uint8List data, {
  3. int? id,
})

Implementation

Future<void> send(String type, Uint8List data, {int? id}) async {
  final msg = ProtocolMessage(id: id ?? getNextMessageId(), type: type, data: data);
  _send.add(msg);
  await msg.sent.future;
}