Beispiel #1
0
 /// <summary>
 /// Stops this instance.
 /// </summary>
 public override void Stop()
 {
     if ((AccessPolicyServer != null) && (FlashAccessPolicyEnabled))
     {
         AccessPolicyServer.Stop();
         AccessPolicyServer = null;
     }
 }
Beispiel #2
0
        /// <summary>
        /// Starts this instance.
        /// </summary>
        public override void Start()
        {
            base.Start();
            if (AccessPolicyServer == null)
            {
                AccessPolicyServer = new AccessPolicyServer(ListenAddress, Origin, Port);

                if (FlashAccessPolicyEnabled)
                {
                    AccessPolicyServer.Start();
                }
            }
        }
 /// <summary>
 /// Stops this WebSocketServer.
 /// When enabled, stops also the FlashAccessPolicy-server.
 /// </summary>
 public override void Stop()
 {
     base.Stop();
     if (AccessPolicyServer != null && FlashAccessPolicyEnabled)
     {
         try
         {
             AccessPolicyServer.Stop();
             AccessPolicyServer = null;
         }
         catch (Exception ex)
         {
             AccessPolicyServer = null;
             throw new OperationCanceledException("cannot stop the AccessPolicyServer", ex);
         }
     }
 }
        /// <summary>
        /// Starts this WebSocketServer on the given listenPort.
        /// When enabled, starts also the FlashAccessPolicy-server on port 843.
        /// </summary>
        public override void Start()
        {
            base.Start();
            if (AccessPolicyServer == null)
            {
                // every server needs an instance for its clients to send AccessPolicy requests to a remote server
                AccessPolicyServer = new AccessPolicyServer(ListenAddress, Origin, Port);

                // at most one instance may be enabled
                if (FlashAccessPolicyEnabled)
                {
                    try
                    {
                        AccessPolicyServer.Start();
                    }
                    catch (Exception ex)
                    {
                        base.Stop();
                        throw new OperationCanceledException("cannot start the AccessPolicyServer", ex);
                    }
                }
            }
        }
 /// <summary>
 /// Stops this instance.
 /// </summary>
 public override void Stop()
 {
     if ((AccessPolicyServer != null) && (FlashAccessPolicyEnabled))
     {
         AccessPolicyServer.Stop();
         AccessPolicyServer = null;
     }
     base.Stop();
 }
        /// <summary>
        /// Starts this instance.
        /// </summary>
        public override void Start()
        {
            base.Start();
            if (AccessPolicyServer == null)
            {
                AccessPolicyServer = new AccessPolicyServer(ListenAddress, Origin, Port);

                if (FlashAccessPolicyEnabled)
                {
                    AccessPolicyServer.Start();
                }
            }
        }