public Gateway() { HttpServer = new HttpApiServer(); HttpServer.Options.Port = 8080; Filters = new Filters.FilterCenter(this); Routes = new Routes.RouteCenter(this); Agents = new Servers.ServerCenter(this); }
public Gateway() { HttpServer = new HttpApiServer(); Filters = new Filters.FilterCenter(this); Routes = new Routes.RouteCenter(this); Agents = new Servers.ServerCenter(this); HttpServer.Options.IOQueueEnabled = true; HttpServer.Options.UrlIgnoreCase = false; AgentMaxSocketError = 5; MaxStatsUrls = 1000; AgentMaxConnection = 300; AgentRequestQueueLength = 2000; int threads = (Environment.ProcessorCount / 2); if (threads == 0) { threads = 1; } multiThreadDispatcher = new BeetleX.Dispatchs.DispatchCenter <RequestAgent>(OnExecuteRequest, Math.Min(threads, 16)); AgentBufferSize = 1024 * 8; AgentBufferPoolSize = 1024 * 200; }