HttpServer.WebServer.Stop C# (CSharp) Method

Stop() public method

Stop the server
public Stop ( ) : void
return void
        public void Stop()
        {
            try { server.Stop(); }
            catch (SocketException ex)
            {
                _logWriter.Write(this, LogPrio.Error, ex.Message);
            }
        }

Usage Example

Example #1
0
        static void Main(string[] args)
        {
            WebServer ws = new WebServer(SendResponse, "http://pastest1.cloudapp.net:80/test/");

            ws.Run();
            Console.WriteLine("A simple webserver. Press a key to quit.");
            Console.ReadKey();
            ws.Stop();
        }