completeClosed method

void completeClosed()

Marks the session as closed.

Incoming stream sources are closed rather than failed: once the session is gone there are no more streams to deliver, which is what the browser does with the corresponding ReadableStreams.

Implementation

void completeClosed() {
  if (!_closed.isCompleted) _closed.complete();
  if (!_incomingBi.isClosed) _incomingBi.close();
  if (!_incomingUni.isClosed) _incomingUni.close();
  _datagrams?.dispose();
}