ALE.Http.Server.Listen C# (CSharp) Method

Listen() public method

Starts the server listening an any number of URI prefixes.
public Listen ( ) : Server
return Server
        public Server Listen(params string[] prefixes)
        {
            if (Process == null)
                throw new InvalidOperationException("Cannot run a server with no callback. Process event must be set.");
            foreach (var prefix in prefixes)
            {
                Listener.Prefixes.Add(prefix);
            }
            if (!Listener.IsListening)
            {
                Listener.Start();
                Listener.BeginGetContext(GetContextCallback, Listener);
            }
            return this;
        }