/** * 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; }
/** * 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; }
/** * 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; } }
//------------------ public interface /** * Creates the provider. * @param stunStack The currently active stack instance. */ public StunProvider(StunStack stunStack) { this.stunStack = stunStack; }
/** * 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; }