ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/repos/Smersh/Daemon.hpp
(Generate patch)

Comparing Smersh/Daemon.hpp (file contents):
Revision 174 by Douglas Thrift, 2004-06-21T20:16:43-07:00 vs.
Revision 175 by Douglas Thrift, 2004-06-25T01:10:49-07:00

# Line 19 | Line 19 | class Daemon
19   private:
20          virtual int handle(api::TcpSocket* client);
21   protected:
22 +        enum Status { ok = 200, found = 302, seeOther, bad = 400, notFound = 404,
23 +                lengthRequired = 411, mediaType = 415, error = 500, notImplemented,
24 +                version = 505 };
25 +        static string crlf;
26          Daemon() {}
27          void serve(int port, bool fork, Daemon* self);
28 +        istream& getline(istream& sin, string& line) { ::getline(sin, line, '\r');
29 +                sin.get(); return sin; }
30 +        Status request(istream& sin, Environment& env, ostream& post, ostream& log);
31 +        void status(ostream& sout, Status status);
32   public:
33          Daemon(int port, bool fork) { Person::configure(); serve(port, fork, this);
34          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines