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

sendMessage method

void sendMessage (Message response)

Sends the given message over the bound channel.

If the channel is not bound, the handles inside the message are closed and the message itself is discarded.

Implementation

void sendMessage(Message response) {
  if (!_reader.isBound) {
    response.closeHandles();
    return;
  }
  _reader.channel.write(response.data, response.handles);
}