Endpoint constructor

Endpoint(
  1. Transport _transport, {
  2. required bool creator,
})

The side that created the channel allocates odd stream ids, the answerer even. The read loop starts on start — after any dispatcher is installed, so an early HEADERS can never race dispatcher setup.

Implementation

Endpoint(this._transport, {required bool creator}) : _nextId = creator ? 1 : 2;