Example #1
0
 internal void Init(object unused)
 {
     HttpServerUtil.workArroundReuse(PortNum);
     try
     {
         Start();
         LogInfo("Ready for HTTPD port " + PortNum);
     }
     catch (Exception e)
     {
         LogInfo("NOT OK for HTTPD port " + PortNum + "\n" + e);
     }
 }
Example #2
0
        internal void Init()
        {
#if USE_HTTPSERVER_DLL
            _listener           = HttpServer.HttpListener.Create(new CHLogger(this), IPAddress.Any, _port);
            _listener.Accepted += _listener_Accepted;
            _listener.Set404Handler(_listener_404);
#endif
            HttpServerUtil.workArroundReuse(_port);
            try
            {
                _listener.Start(10);
                LogInfo("Ready for HTTPD port " + _port);
                new SystemHttpServer(clientManager, _port + 10, "first_robot_name");
                WriteLine("Ready for HTTPD port " + _port);
            }
            catch (Exception e)
            {
                WriteLine("NOT OK for HTTPD port " + _port + "\n" + e);
            }
        }