Example #1
0
        public async Task<Http2Stream> Get ()
        {
            await lockStreams.WaitAsync ();

            var stream = new Http2Stream (flowControlManager, GetNextIdentifier ());

            streams.Add (stream.StreamIdentifer, stream);

            lockStreams.Release ();

            return stream;
        }
Example #2
0
        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;
        }
Example #3
0
        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);
        }