public WorkerRequest(LyoHost host, HttpProcessor processor, RequestInfo requestInfo) { _host = host; _processor = processor; _requestInfo = requestInfo; _responseHeaders = new Dictionary <string, string>(); _responseBodyBytes = new List <byte[]>(); ParseRequestHeaders(); }
static void Main(string[] args) { int port; string dir = Directory.GetCurrentDirectory(); if (args.Length == 0 || !int.TryParse(args[0], out port)) { port = int.Parse(Config.CreatInstance().GetConfigValue("port")); } InitHostFile(dir); LyoHost host = (LyoHost)ApplicationHost.CreateApplicationHost(typeof(LyoHost), "/", dir); host.Config("/", dir); WebServer server = new WebServer(host, port); server.Start(); }
public WebServer(LyoHost host, int port) { _host = host; Port = port; }
public HttpProcessor(LyoHost host, Socket socket) { _host = host; _socket = socket; }