Exemple #1
0
        private void stop(ushort code, string reason)
        {
            var data = code.Append(reason);

            if (data.Length > 125)
            {
                var msg = "The payload length of a Close frame must be 125 bytes or less.";
                Log.Error(String.Format("{0}\ncode: {1}\nreason: {2}", msg, code, reason));
                Error(msg);

                return;
            }

            base.Stop();
            _serviceHosts.Stop(code, reason);
        }
Exemple #2
0
        /// <summary>
        /// Stops receiving the HTTP requests.
        /// </summary>
        public void Stop()
        {
            if (!_listening)
            {
                return;
            }

            _listener.Close();
            _receiveRequestThread.Join(5 * 1000);
            _svcHosts.Stop();
            _listening = false;
        }
 /// <summary>
 /// Shuts down the <see cref="HttpServer"/>.
 /// </summary>
 public void Stop()
 {
     _listener.Close();
     _receiveRequestThread.Join(5 * 1000);
     _svcHosts.Stop();
 }
Exemple #4
0
 /// <summary>
 /// Stops receiving the WebSocket connection requests.
 /// </summary>
 public override void Stop()
 {
     base.Stop();
     _svcHosts.Stop();
 }