send method

Future<void> send(
  1. RTCDataChannelMessage message
)

Implementation

Future<void> send(RTCDataChannelMessage message) {
  if (!message.isBinary) {
    _jsDc.send(message.text);
  } else {
    // This may just work
    _jsDc.sendByteBuffer(message.binary.buffer);
    // If not, convert to ArrayBuffer/Blob
  }
  return Future.value();
}