sendBinary method

dynamic sendBinary(
  1. Uint8List bytes
)

Send binary data to remote peer. Call peer.connect() first to ensure data channel is ready.

Implementation

sendBinary(Uint8List bytes) async {
  var message = RTCDataChannelMessage.fromBinary(bytes);
  await _dataChannel!.send(message);
  _print('Sent binary message of size ${bytes.length}');
}