public HttpTransferManager(AppleLifecycle lifecycle, ILogger <IHttpTransferManager> logger, IPlatform platform, int maxConnectionsPerHost = 1) { this.platform = platform; this.logger = logger; this.sessionDelegate = new ShinyUrlSessionDelegate(this, logger, platform); this.sessionConfig = NSUrlSessionConfiguration.CreateBackgroundSessionConfiguration(SessionName); this.sessionConfig.HttpMaximumConnectionsPerHost = maxConnectionsPerHost; this.sessionConfig.RequestCachePolicy = NSUrlRequestCachePolicy.ReloadIgnoringLocalAndRemoteCacheData; var s = this.Session; // force load lifecycle.RegisterHandleEventsForBackgroundUrl((sessionIdentifier, completionHandler) => { if (!SessionName.Equals(sessionIdentifier)) { return(false); } ShinyUrlSessionDelegate.CompletionHandler = completionHandler; return(true); }); }
public HttpTransferManager(int maxConnectionsPerHost = 1) { this.sessionDelegate = new ShinyUrlSessionDelegate(this); this.sessionConfig = NSUrlSessionConfiguration.CreateBackgroundSessionConfiguration(SessionName); this.sessionConfig.HttpMaximumConnectionsPerHost = maxConnectionsPerHost; this.sessionConfig.RequestCachePolicy = NSUrlRequestCachePolicy.ReloadIgnoringLocalAndRemoteCacheData; var s = this.Session; // force load }
public HttpTransferManager(int maxConnectionsPerHost = 1) { this.sessionDelegate = new ShinyUrlSessionDelegate(this); this.sessionConfig = NSUrlSessionConfiguration.CreateBackgroundSessionConfiguration(SessionName); this.sessionConfig.HttpMaximumConnectionsPerHost = maxConnectionsPerHost; this.sessionConfig.RequestCachePolicy = NSUrlRequestCachePolicy.ReloadIgnoringLocalAndRemoteCacheData; var s = this.Session; // force load //this.sessionConfig.Discretionary = true; //this.sessionConfig.HttpShouldUsePipelining = true; //this.sessionConfig.RequestCachePolicy = NSUrlRequestCachePolicy.ReloadIgnoringCacheData; //this.sessionConfig.ShouldUseExtendedBackgroundIdleMode = true; }