Google is committed to advancing racial equity for Black communities. See how.

sendMessage method

void sendMessage (Message message)

Sends the given messages over the bound channel.

Used by subclasses of Proxy<T> to send encoded messages.

Implementation

void sendMessage(Message message) {
  if (!_reader.isBound) {
    proxyError(FidlStateException(
        'AsyncProxyController<${$interfaceName}> is closed.'));
    return;
  }
  final int status = _reader.channel.write(message.data, message.handles);
  if (status != ZX.OK) {
    proxyError(FidlError(
        'AsyncProxyController<${$interfaceName}> failed to write to channel: ${_reader.channel} (status: $status)'));
  }
}