WebSocketSharp.Net.HttpListener.Close C# (CSharp) Method

Close() public method

Shuts down the HttpListener.
public Close ( ) : void
return void
        public void Close()
        {
            if (disposed)
                return;

            Close (false);
            disposed = true;
        }

Same methods

HttpListener::Close ( bool force ) : void

Usage Example

        public void Stop()
        {
            if (_listener != null)
            {
                foreach (var prefix in _listener.Prefixes.ToList())
                {
                    _listener.Prefixes.Remove(prefix);
                }

                _listener.Close();
            }
        }