Exemple #1
0
        public void UpdateFromFrame(SettingsFrame frame, IFlowControlManager flowControlStateManager)
        {
            if (frame.EnablePush.HasValue)
            {
                EnablePush = frame.EnablePush.Value;
            }
            if (frame.HeaderTableSize.HasValue)
            {
                HeaderTableSize = frame.HeaderTableSize.Value;
            }
            if (frame.MaxConcurrentStreams.HasValue)
            {
                MaxConcurrentStreams = frame.MaxConcurrentStreams.Value;
            }
            if (frame.MaxFrameSize.HasValue)
            {
                MaxFrameSize = frame.MaxFrameSize.Value;
            }
            if (frame.MaxHeaderListSize.HasValue)
            {
                MaxHeaderListSize = frame.MaxHeaderListSize.Value;
            }

            if (frame.InitialWindowSize.HasValue)
            {
                InitialWindowSize = frame.InitialWindowSize.Value;

                // Try and update the flow control manager's initial size
                if (flowControlStateManager != null)
                {
                    flowControlStateManager.InitialWindowSize = InitialWindowSize;
                }
            }
        }
Exemple #2
0
        public Http2Stream(IFlowControlManager flowControlStateManager, uint streamIdentifier)
        {
            this.flowControlStateManager = flowControlStateManager;

            StreamIdentifer = streamIdentifier;
            State           = StreamState.Idle;
        }
Exemple #3
0
        public Http2Client (Http2ConnectionSettings connectionSettings, IStreamManager streamManager = null, IFlowControlManager flowControlManager = null)
        {            
            this.flowControlManager = flowControlManager ?? new FlowControlManager ();
            this.streamManager = streamManager ?? new StreamManager (this.flowControlManager);
            this.ConnectionSettings = connectionSettings;

            connection = new Http2Connection (ConnectionSettings, this.streamManager, this.flowControlManager);
        }
Exemple #4
0
        public Http2Client(Http2ConnectionSettings connectionSettings, IStreamManager streamManager = null, IFlowControlManager flowControlManager = null)
        {
            this.flowControlManager = flowControlManager ?? new FlowControlManager();
            this.streamManager      = streamManager ?? new StreamManager(this.flowControlManager);
            this.ConnectionSettings = connectionSettings;

            connection = new Http2Connection(ConnectionSettings, this.streamManager, this.flowControlManager);
        }
        public StreamManager(IFlowControlManager flowControlManager)
        {
            this.flowControlManager = flowControlManager;

            streams = new Dictionary <uint, Http2Stream> ();

            // Add special stream '0' to act as connection level
            streams.Add(0, new Http2Stream(this.flowControlManager, 0));
        }
        public StreamManager (IFlowControlManager flowControlManager)
        {
            this.flowControlManager = flowControlManager;

            streams = new Dictionary<uint, Http2Stream> ();

            // Add special stream '0' to act as connection level
            streams.Add (0, new Http2Stream (this.flowControlManager, 0));
        }
Exemple #7
0
        public Http2Stream(IFlowControlManager flowControlStateManager, uint streamIdentifier)
        {
            this.flowControlStateManager = flowControlStateManager;

            ReceivedFrames  = new List <IFrame> ();
            SentFrames      = new List <IFrame> ();
            StreamIdentifer = streamIdentifier;
            State           = StreamState.Idle;
        }
Exemple #8
0
        public Http2Stream (IFlowControlManager flowControlStateManager, uint streamIdentifier)
        {
            this.flowControlStateManager = flowControlStateManager;

            ReceivedFrames = new List<IFrame> ();
            SentFrames = new List<IFrame> ();
            StreamIdentifer = streamIdentifier;
            State = StreamState.Idle;
        }
        public Http2Connection (Http2ConnectionSettings connectionSettings, IStreamManager streamManager, IFlowControlManager flowControlManager)
        {
            this.flowControlManager = flowControlManager;
            this.streamManager = streamManager;

            ConnectionSettings = connectionSettings;
            Settings = new Http2Settings ();

            queue = new FrameQueue (flowControlManager);
        }
Exemple #10
0
        public FrameQueue (IFlowControlManager flowControlManager)
        {
            this.flowControlManager = flowControlManager;

            // Signal the possible presence of data in the queue if the window size increases
            // to allow any paused frames to be sent
            this.flowControlManager.FlowControlWindowSizeIncreased += (streamIdentifier, increasedByAmount) => 
                waitAny.Set ();

            // Add our priority lists 
            frameQueues = new Dictionary<int, List<IFrame>> ();
            foreach (var p in PRIORITIES)
                frameQueues.Add (p, new List<IFrame> ());            
        }
        public FrameQueue(IFlowControlManager flowControlManager)
        {
            this.flowControlManager = flowControlManager;

            // Signal the possible presence of data in the queue if the window size increases
            // to allow any paused frames to be sent
            this.flowControlManager.FlowControlWindowSizeIncreased += (streamIdentifier, increasedByAmount) =>
                                                                      waitAny.Set();

            // Add our priority lists
            frameQueues = new Dictionary <int, List <IFrame> > ();
            foreach (var p in PRIORITIES)
            {
                frameQueues.Add(p, new List <IFrame> ());
            }
        }
Exemple #12
0
        public void UpdateFromFrame (SettingsFrame frame, IFlowControlManager flowControlStateManager)
        {
            if (frame.EnablePush.HasValue)
                EnablePush = frame.EnablePush.Value;
            if (frame.HeaderTableSize.HasValue)
                HeaderTableSize = frame.HeaderTableSize.Value;
            if (frame.MaxConcurrentStreams.HasValue)
                MaxConcurrentStreams = frame.MaxConcurrentStreams.Value;
            if (frame.MaxFrameSize.HasValue)
                MaxFrameSize = frame.MaxFrameSize.Value;
            if (frame.MaxHeaderListSize.HasValue)
                MaxHeaderListSize = frame.MaxHeaderListSize.Value;

            if (frame.InitialWindowSize.HasValue) {
                InitialWindowSize = frame.InitialWindowSize.Value;

                // Try and update the flow control manager's initial size
                if (flowControlStateManager != null)
                    flowControlStateManager.InitialWindowSize = InitialWindowSize;
            }
        }
        public Http2Connection(Http2ConnectionSettings connectionSettings, IStreamManager streamManager, IFlowControlManager flowControlManager)
        {
            this.flowControlManager = flowControlManager;
            this.streamManager      = streamManager;

            ConnectionSettings = connectionSettings;
            Settings           = new Http2Settings();

            queue = new FrameQueue(flowControlManager);
        }
Exemple #14
0
 public Http2Client(string url, X509CertificateCollection certificates = null, IStreamManager streamManager = null, IFlowControlManager flowControlManager = null)
     : this(new Http2ConnectionSettings(url, certificates), streamManager, flowControlManager)
 {
 }
 public StreamManager(IFlowControlManager flowControlManager)
 {
     this.flowControlManager = flowControlManager;
     Reset();
 }
Exemple #16
0
 public Http2Client (string url, X509CertificateCollection certificates = null, IStreamManager streamManager = null, IFlowControlManager flowControlManager = null)
     : this (new Http2ConnectionSettings (url, certificates), streamManager, flowControlManager)
 {
 }