Exemplo n.º 1
0
 public static void Start(int port, IEcsDebugHelper debugHelper)
 {
     try
     {
         _logger.InfoFormat("Start MyHttpServer:{0}", port);
         if (webserver != null)
         {
             try
             {
                 webserver.Stop();
             }
             catch (Exception e)
             {
                 _logger.InfoFormat("Stop MyHttpServer:{0}", e);
             }
         }
         webserver = new SimpleHttpServer("/non-existing-folder", port);
         webserver.AddPageHandler("/ObjectPool", new ObjectAllocatorPageHandler());
         webserver.AddPageHandler("/EntityMap", new EntityMapComparePageHandler());
         webserver.AddPageHandler("/Network", new ENetNetworkHandler());
         webserver.AddPageHandler("/BandWidthMonitor", new BandWidthMonitorHandler());
         webserver.AddPageHandler("/SanpShotData", new SnapSHotHandler());
         webserver.AddPageHandler("/fps", new FpsHandler());
         webserver.AddPageHandler("/debug", new DebugHandler(debugHelper));
         webserver.AddPageHandler("/rigidbody", new RigidbodyInfoHandler());
         webserver.AddPageHandler("/res", new LoadResHandler(true));
         webserver.AddPageHandler("/resall", new LoadResHandler(false));
         webserver.AddPageHandler("/triggerobject", new TriggerObjectDebugHandler());
         webserver.AddPageHandler("/all", new AllPageHandler());
         webserver.AddPageHandler("/freelog-var", new FreeDebugDataHandler(1));
         webserver.AddPageHandler("/freelog-message", new FreeDebugDataHandler(2));
         webserver.AddPageHandler("/freelog-func", new FreeDebugDataHandler(3));
     }
     catch (Exception e)
     {
         _logger.ErrorFormat("Start Http server failed: {0}", e);
     }
 }
Exemplo n.º 2
0
 public DebugHandler(IEcsDebugHelper debugHelper)
 {
     _debugHelper = debugHelper;
 }