Пример #1
0
        /**
         * Shuts down the underlying stack and prepares the object for garbage
         * collection.
         */
        public virtual void ShutDown()
        {
            StunStack.ShutDown();
            stunStack     = null;
            stunProvider  = null;
            requestSender = null;

            this.started = false;
        }
Пример #2
0
        /**
         * Puts the discoverer into an operational state.
         * @throws StunException if we fail to bind or some other error occurs.
         */
        public virtual void Start()
        {
            stunStack = StunStack.Instance;
            stunStack.Start();

            stunProvider = stunStack.GetProvider();



            started = true;
        }
        /**
         * Puts the discoverer into an operational state.
         * @throws StunException if we fail to bind or some other error occurs.
         */
        virtual public void Start()
        {
            stunStack = StunStack.Instance;
            stunStack.Start();

            stunStack.InstallNetAccessPoint(apDescriptor);

            stunProvider = stunStack.GetProvider();

            requestSender = new BlockingRequestSender(stunProvider, apDescriptor);

            started = true;
        }
Пример #4
0
        /**
         * Stops the stack.
         */
        public static void ShutDown()
        {
            lock (typeof(StunStack))
            {
                if (stackInstance == null)
                {
                    return;
                }
                stackInstance.netAccessManager.ShutDown();
                stackInstance.stunProvider.ShutDown();

                stackInstance.netAccessManager = null;
                stackInstance.stunProvider     = null;
                stackInstance = null;
            }
        }
Пример #5
0
        //------------------ public interface

        /**
         * Creates the provider.
         * @param stunStack The currently active stack instance.
         */
        public StunProvider(StunStack stunStack)
        {
            this.stunStack = stunStack;
        }
Пример #6
0
        /**
         * Stops the stack.
         */
        public static void ShutDown()
        {
            lock (typeof(StunStack))
            {
                if (stackInstance == null)
                    return;
                stackInstance.netAccessManager.ShutDown();
                stackInstance.stunProvider.ShutDown();

                stackInstance.netAccessManager = null;
                stackInstance.stunProvider = null;
                stackInstance = null;
            }
        }
        /**
         * Puts the discoverer into an operational state.
         * @throws StunException if we fail to bind or some other error occurs.
         */
        public virtual void Start()
        {
            stunStack = StunStack.Instance;
            stunStack.Start();

            stunStack.InstallNetAccessPoint(apDescriptor);

            stunProvider = stunStack.GetProvider();

            requestSender = new BlockingRequestSender(stunProvider, apDescriptor);

            started = true;
        }
        /**
         * Shuts down the underlying stack and prepares the object for garbage
         * collection.
         */
        public virtual void ShutDown()
        {
            StunStack.ShutDown();
            stunStack     = null;
            stunProvider  = null;
            apDescriptor  = null;
            requestSender = null;

            this.started = false;
        }
Пример #9
0
 //------------------ public interface
 /**
  * Creates the provider.
  * @param stunStack The currently active stack instance.
  */
 public StunProvider(StunStack stunStack)
 {
     this.stunStack = stunStack;
 }