From 2e5bed84841f33ff28dd95b77b555720c875a286 Mon Sep 17 00:00:00 2001 From: Pixel Date: Mon, 29 Oct 2001 15:44:12 +0000 Subject: Beginning task manager --- lib/HttpServ.cc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'lib/HttpServ.cc') diff --git a/lib/HttpServ.cc b/lib/HttpServ.cc index 97152a9..b354f69 100644 --- a/lib/HttpServ.cc +++ b/lib/HttpServ.cc @@ -1,6 +1,7 @@ +#include "Socket.h" #include "Action.h" #include "HttpServ.h" -#include "Socket.h" +#include "Buffer.h" #include "config.h" String endhl = "\r\n", endnl = "\n"; @@ -13,12 +14,11 @@ HttpServ::HttpServ(int port, const String & nname) : name(nname), localport(port void HttpServ::MainLoop(Action * p) { while (1) { - ProcessRequest(p); + ProcessRequest(p, Socket(Listener.Accept())); } } -void HttpServ::ProcessRequest(Action * p) { - Socket s(Listener.Accept()); +void HttpServ::ProcessRequest(Action * p, Socket s) { String file, domain, t; Action * f; int len; @@ -31,7 +31,6 @@ void HttpServ::ProcessRequest(Action * p) { bool post = ParseUri(file, domain, s); - len = -1; do { s >> t; -- cgit v1.2.3