openUnidirectionalStream method
Allocates a new client-initiated unidirectional stream ID and creates the send-side stream in the streamManager.
Unidirectional streams allow only the initiator to send data; the peer can only receive. If 0-RTT keys are currently available, the new stream is marked as early data.
Throws StateError if the connection is closed or the stream limit has been reached.
Implementation
int openUnidirectionalStream() {
final streamId = _streamIdAllocator.allocateClientUni();
_streamManager.createSendStream(
streamId,
isEarlyData: canSendZeroRtt,
);
return streamId;
}