acceptStream method

  1. @override
Future<MuxedStream> acceptStream()
override

Accepts a stream opened by the other side.

Implementation

@override
Future<MuxedStream> acceptStream() async {
  if (!await _acceptQueue.moveNext()) throw StateError('$id: connection closed');
  return _acceptQueue.current;
}