コード例 #1
0
 public Gateway()
 {
     HttpServer            = new HttpApiServer();
     Routes                = new Routes.RouteCenter(this);
     Agents                = new Servers.ServerCenter(this);
     this.PluginCenter     = new PluginCenter(this);
     this.Pluginer         = new Pluginer(this, null);
     Statistics.Server     = "Gateway";
     AgentMaxSocketError   = 3;
     MaxStatsUrls          = 20000;
     AgentMaxConnection    = 200;
     AgentRequestQueueSize = 500;
     ThreadQueues          = (Environment.ProcessorCount / 2);
     if (ThreadQueues == 0)
     {
         ThreadQueues = 1;
     }
     GatewayQueueSize = Environment.ProcessorCount * 100;
     InstanceID       = Guid.NewGuid().ToString("N");
     GATEWAY_VERSION  = $"beetlex.io[{typeof(BeetleX.BXException).Assembly.GetName().Version}/{HttpServer.GetType().Assembly.GetName().Version}/{GetType().Assembly.GetName().Version}]";
 }