public static void Stop() { if (!m_isStarted) { throw new InvalidOperationException(); } // Send bye if (m_discoGreeting != null) { m_discoGreeting.SendGreetingMessage(false); } WsUdpServiceHost.Instance.Stop(); System.Ext.Console.Write("Udp service host stopped..."); m_eventQManager.Stop(); System.Ext.Console.Write("Event subscription manager stopped..."); m_httpServiceHost.Stop(); System.Ext.Console.Write("Http service host stopped..."); m_isStarted = false; // TODO: Use extended weak references to assure an incremental value even after boot m_AppSequence++; }
/// <summary> /// Stop transport services and releases the managed resources used by this class. /// </summary> /// <param name="disposing">True to release managed resources</param> internal void Dispose(bool disposing) { // Stop the transport services if (m_httpServiceHost != null) { m_httpServiceHost.Stop(); } WsUdpServiceHost.Instance.Stop(); }
/// <summary> /// Static method used to stop stack transport services. /// </summary> /// <remarks> /// This method stops the underlying stack transport services and the devices event queue manager. /// </remarks> public static void Stop() { m_eventQManager.Stop(); m_udpServiceHost.Stop(); m_httpServiceHost.Stop(); // Send bye DpwsDiscoGreeting.SendGreetingMessage(false); isStarted = false; }
/// <summary> /// Stop tranport services and releases the managed resources used by this class. /// </summary> /// <param name="disposing">True to release managed resources</param> internal void Dispose(bool disposing) { if (disposing) { // Stop the transport services m_httpServiceHost.Stop(); m_udpSeviceHost.Stop(); m_threadLock = null; m_discoClient = null; m_endpointAddress = null; m_eventClient = null; m_mexClient = null; m_eventCallbacks = null; m_transportAddress = null; m_bodyParts = null; m_discoServiceEndpoints = null; m_callbackServiceEndpoints = null; m_udpSeviceHost = null; m_httpServiceHost = null; } }