reset method

  1. @override
Future<void> reset()
override

Resets closes both ends of the stream. Use this to tell the remote side to hang up and go away.

Implementation

@override
Future<void> reset() async {
  _logger.fine('[UDXP2PStreamAdapter ${id()}] reset() called, performing full stream close with error.');
  final exception = SocketException("Stream reset by local peer");
  await _closeWithError(exception, StackTrace.current);
  throw exception;
}