internal virtual Stream CallResync(PushServerProxy.PushServerProxyInfo pushInfo, ConnectionConstraints newConstraints) { IDictionary parameters = new Dictionary<string, string>(); parameters["LS_session"] = pushInfo.sessionId; if (newConstraints != null) { this.info.constraints = (ConnectionConstraints) newConstraints.Clone(); } AddConnectionProperties(parameters, this.info); AddConstraints(parameters, this.info.constraints); HttpProvider provider = new HttpProvider(pushInfo.rebindAddress + "/lightstreamer/bind_session.txt"); protLogger.Info("Opening stream connection to rebind current session"); if (protLogger.IsDebugEnabled) { protLogger.Debug("Rebinding params: " + CollectionsSupport.ToString(parameters)); } parameters["LS_silverlight_version"] = Constants.localVersion; bool flag = !this.info.isPolling && this.info.useGetForStreaming; return provider.DoHTTP(parameters, !flag); }
internal virtual Stream CallSession() { IDictionary parameters = new Dictionary<string, string>(); if (this.info.user != null) { parameters["LS_user"] = this.info.user; } if (this.info.password != null) { parameters["LS_password"] = this.info.password; } parameters["LS_adapter_set"] = this.info.GetAdapterSet(); if (!(this.info.isPolling || !this.info.useGetForStreaming)) { AddConnectionPropertiesForFakePolling(parameters, this.info); } else { AddConnectionProperties(parameters, this.info); } AddConstraints(parameters, this.info.constraints); HttpProvider provider = new HttpProvider(this.info.pushServerUrl + "/lightstreamer/create_session.txt"); protLogger.Info("Opening stream connection"); if (protLogger.IsDebugEnabled) { protLogger.Debug("Connection params: " + CollectionsSupport.ToString(parameters)); } return provider.DoHTTP(parameters, true); }
internal virtual StreamReader GetNotBatchedAnswer(string controlUrl, IDictionary parameters) { HttpProvider provider = new HttpProvider(controlUrl); protLogger.Info("Opening control connection"); if (protLogger.IsDebugEnabled) { protLogger.Debug("Control params: " + CollectionsSupport.ToString(parameters)); } return new StreamReader(provider.DoHTTP(parameters, true), Encoding.UTF8); }