fail method

void fail(
  1. Object error
)

Simulates a network failure: both sides see error and the connection closes.

Implementation

void fail(Object error) => _closer.close(error);