Exemplo n.º 1
0
        internal ServerManager(ConnectionInfo info, IConnectionListener listener, IServerListener asyncListener)
        {
            Stream stream = null;

            this.probeTimeoutMillis        = info.probeTimeoutMillis;
            this.probeWarningMillis        = info.probeWarningMillis;
            this.reconnectionTimeoutMillis = info.reconnectionTimeoutMillis;
            this.localPushServerProxy      = new PushServerProxy(info);
            try
            {
                stream = this.localPushServerProxy.ConnectForSession();
                try
                {
                    listener.OnConnectionEstablished();
                }
                catch (Exception)
                {
                }
                this.localPushServerProxy.StartSession(stream);
                try
                {
                    listener.OnSessionStarted();
                }
                catch (Exception)
                {
                }
            }
            catch (PhaseException)
            {
            }
            this.serverListener = asyncListener;
        }
 internal ServerManager(ConnectionInfo info, IConnectionListener listener, IServerListener asyncListener)
 {
     Stream stream = null;
     this.probeTimeoutMillis = info.probeTimeoutMillis;
     this.probeWarningMillis = info.probeWarningMillis;
     this.reconnectionTimeoutMillis = info.reconnectionTimeoutMillis;
     this.localPushServerProxy = new PushServerProxy(info);
     try
     {
         stream = this.localPushServerProxy.ConnectForSession();
         try
         {
             listener.OnConnectionEstablished();
         }
         catch (Exception)
         {
         }
         this.localPushServerProxy.StartSession(stream);
         try
         {
             listener.OnSessionStarted();
         }
         catch (Exception)
         {
         }
     }
     catch (PhaseException)
     {
     }
     this.serverListener = asyncListener;
 }