internal PushServerTranslator(ConnectionInfo info)
 {
     int realLen;
     this.cookies = new CookieContainer();
     this.batchManager = new BatchManager(this.cookies);
     this.mexBatchManager = new BatchManager(this.cookies);
     ConnectionInfo localInfo = (ConnectionInfo) info.Clone();
     if (localInfo.PushServerUrl == null)
     {
         throw new PushConnException("Connection property 'pushServerUrl' not set");
     }
     while (localInfo.PushServerUrl.EndsWith("/"))
     {
         realLen = localInfo.PushServerUrl.Length - 1;
         localInfo.PushServerUrl = localInfo.PushServerUrl.Substring(0, realLen);
     }
     if (localInfo.PushServerControlUrl != null)
     {
         while (localInfo.PushServerControlUrl.EndsWith("/"))
         {
             realLen = localInfo.PushServerControlUrl.Length - 1;
             localInfo.PushServerControlUrl = localInfo.PushServerControlUrl.Substring(0, realLen);
         }
     }
     this.info = localInfo;
 }
        internal PushServerTranslator(ConnectionInfo info)
        {
            int num;

            this.batchManager = new BatchManager();
            ConnectionInfo info2 = (ConnectionInfo)info.Clone();

            if (info2.pushServerUrl == null)
            {
                throw new PushConnException("Connection property 'pushServerUrl' not set");
            }
            while (info2.pushServerUrl.EndsWith("/"))
            {
                num = info2.pushServerUrl.Length - 1;
                info2.pushServerUrl = info2.pushServerUrl.Substring(0, num);
            }
            if (info2.pushServerControlUrl != null)
            {
                while (info2.pushServerControlUrl.EndsWith("/"))
                {
                    num = info2.pushServerControlUrl.Length - 1;
                    info2.pushServerControlUrl = info2.pushServerControlUrl.Substring(0, num);
                }
            }
            this.info = info2;
        }
 internal PushServerTranslator(ConnectionInfo info)
 {
     int num;
     this.batchManager = new BatchManager();
     ConnectionInfo info2 = (ConnectionInfo) info.Clone();
     if (info2.pushServerUrl == null)
     {
         throw new PushConnException("Connection property 'pushServerUrl' not set");
     }
     while (info2.pushServerUrl.EndsWith("/"))
     {
         num = info2.pushServerUrl.Length - 1;
         info2.pushServerUrl = info2.pushServerUrl.Substring(0, num);
     }
     if (info2.pushServerControlUrl != null)
     {
         while (info2.pushServerControlUrl.EndsWith("/"))
         {
             num = info2.pushServerControlUrl.Length - 1;
             info2.pushServerControlUrl = info2.pushServerControlUrl.Substring(0, num);
         }
     }
     this.info = info2;
 }
 private void DoControlRequest(PushServerProxy.PushServerProxyInfo pushInfo, IDictionary parameters, string commandPath, BatchMonitor batch, BatchManager selectedBatchManager)
 {
     string controlUrl = pushInfo.controlAddress + commandPath;
     StreamReader answer = selectedBatchManager.GetAnswer(controlUrl, parameters, batch);
     try
     {
         this.CheckAnswer(answer);
     }
     catch (PushEndException)
     {
         throw new PushServerException(7);
     }
     finally
     {
         try
         {
             if (!(answer is BatchingHttpProvider.MyReader))
             {
                 streamLogger.Debug("Closing control connection");
             }
             answer.Close();
         }
         catch (IOException e)
         {
             streamLogger.Debug("Error closing control connection", e);
         }
     }
 }