public async Task<Http2Stream> Get () { await lockStreams.WaitAsync (); var stream = new Http2Stream (flowControlManager, GetNextIdentifier ()); streams.Add (stream.StreamIdentifer, stream); lockStreams.Release (); return stream; }
public async Task<Http2Stream> Get (uint streamIdentifier) { await lockStreams.WaitAsync (); Http2Stream stream = null; if (!streams.ContainsKey (streamIdentifier)) { stream = new Http2Stream (flowControlManager, streamIdentifier); streams.Add (streamIdentifier, stream); } else { stream = streams [streamIdentifier]; } lockStreams.Release (); return stream; }
public async Task <Http2Stream> Get(uint streamIdentifier) { await lockStreams.WaitAsync(); Http2Stream stream = null; if (!streams.ContainsKey(streamIdentifier)) { stream = new Http2Stream(flowControlManager, streamIdentifier); streams.Add(streamIdentifier, stream); } else { stream = streams [streamIdentifier]; } lockStreams.Release(); return(stream); }