public HPACKEncoder(HTTP2Handler parentHandler, HTTP2SettingsManager registry) { this.parent = parentHandler; this.settingsRegistry = registry; // I'm unsure what settings (local or remote) we should use for these two tables! this.requestTable = new HeaderTable(this.settingsRegistry.MySettings); this.responseTable = new HeaderTable(this.settingsRegistry.RemoteSettings); }
public HTTP2SettingsManager(HTTP2Handler parentHandler) { this.Parent = parentHandler; this.MySettings = new HTTP2SettingsRegistry(this, readOnly: true, treatItAsAlreadyChanged: false); this.InitiatedMySettings = new HTTP2SettingsRegistry(this, readOnly: false, treatItAsAlreadyChanged: true); this.RemoteSettings = new HTTP2SettingsRegistry(this, readOnly: true, treatItAsAlreadyChanged: false); this.SettingsChangesSentAt = DateTime.MinValue; }
/// <summary> /// Constructor to create a client stream. /// </summary> public HTTP2Stream(UInt32 id, HTTP2Handler parentHandler, HTTP2SettingsManager registry, HPACKEncoder hpackEncoder) { this.Id = id; this.parent = parentHandler; this.settings = registry; this.encoder = hpackEncoder; this.remoteWindow = this.settings.RemoteSettings[HTTP2Settings.INITIAL_WINDOW_SIZE]; this.settings.RemoteSettings.OnSettingChangedEvent += OnRemoteSettingChanged; // Room for improvement: If INITIAL_WINDOW_SIZE is small (what we can consider a 'small' value?), threshold must be higher this.windowUpdateThreshold = (uint)(this.remoteWindow / 2); this.Context = new LoggingContext(this); this.Context.Add("id", id); }