sendNowait method

int sendNowait(
  1. String type,
  2. Uint8List data, {
  3. int? id,
})

Implementation

int sendNowait(String type, Uint8List data, {int? id}) {
  if (_sendError != null) {
    throw _sendError!;
  }
  if (_closed) {
    throw StateError('protocol is closed');
  }
  final msg = ProtocolMessage(id: id ?? getNextMessageId(), type: type, data: data);
  _send.add(msg);
  return msg.id;
}