diff options
author | Pixel <Pixel> | 2001-10-29 15:44:12 +0000 |
---|---|---|
committer | Pixel <Pixel> | 2001-10-29 15:44:12 +0000 |
commit | 2e5bed84841f33ff28dd95b77b555720c875a286 (patch) | |
tree | de6cbcbf5fa65e90e1888d52a9426373a1638c61 /lib/HttpServ.cc | |
parent | 0a6190d0269392e875a479df01b152d47ea4143c (diff) |
Beginning task manager
Diffstat (limited to 'lib/HttpServ.cc')
-rw-r--r-- | lib/HttpServ.cc | 9 |
1 files changed, 4 insertions, 5 deletions
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; |