Пример #1
0
        /// <summary>
        /// 启动行情接收
        /// </summary>
        public void Start()
        {
            m_listener.RequestReceived += OnHttpMarketDataChanged;

            try
            {
                m_threadListener = new Thread(new ThreadStart(delegate
                {
                    try
                    {
                        m_eventLogger.WriteError("尝试启动监听...");

                        StartListner(m_listener);
                    }
                    catch (Exception ex)
                    {
                        m_eventLogger.WriteError("Http监听停止thread..." + ex.Message);
                        m_listener.Stop();
                    }
                }));

                m_threadListener.Start();
            }
            catch (Exception ex)
            {
                m_eventLogger.WriteError("Http监听停止..." + ex.Message);
            }


            m_eventLogger.WriteError("建立Http连接成功...");
        }
Пример #2
0
 public static void Stop()
 {
     if (httpListener != null)
     {
         httpListener.Stop();
     }
 }
Пример #3
0
 public void Stop()
 {
     if (m_httpServer != null)
     {
         m_httpServer.RequestReceived -= RequestReceivedHandler;
         m_httpServer.Stop();
     }
 }
Пример #4
0
        public void Stop()
        {
            if (serverOwned)
            {
                server.Stop();
            }

            server.RemoveHandler(capsHandler);
        }
Пример #5
0
 private void StopHTTP()
 {
     if (!HTTPRunning)
     {
         return;
     }
     m_HttpListener.Stop();
     m_HttpListener.ExceptionThrown -= httpServerException;
     m_HttpListener.RequestReceived -= OnRequest;
     HTTPRunning = false;
 }
Пример #6
0
 /// <summary>
 /// Stops the RESTful API service
 /// </summary>
 public virtual void Stop()
 {
     listener.Stop();
 }
Пример #7
0
 public void Stop()
 {
     _listener.Stop();
 }
Пример #8
0
 public void EndTutorial()
 {
     _listener.Stop();
 }