Starshatter_Open
Open source Starshatter engine
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
HttpServletExec.h
Go to the documentation of this file.
1 /* Project nGenEx
2  Destroyer Studios LLC
3  Copyright © 1997-2004. All Rights Reserved.
4 
5  SUBSYSTEM: NetEx.lib
6  FILE: HttpServletExec.h
7  AUTHOR: John DiCamillo
8 
9 
10  OVERVIEW
11  ========
12  Network Server Pump for HTTP Server
13 */
14 
15 
16 #ifndef HttpServletExec_h
17 #define HttpServletExec_h
18 
19 #include "HttpServer.h"
20 
21 // +-------------------------------------------------------------------+
22 
23 class HttpServlet;
24 class HttpSession;
25 
26 // +-------------------------------------------------------------------+
27 
29 {
30 public:
31  static const char* TYPENAME() { return "HttpServletExec"; }
32 
33  HttpServletExec(WORD port, int poolsize=1);
34  virtual ~HttpServletExec();
35 
36  int operator == (const HttpServletExec& l) const { return addr == l.addr; }
37 
38  virtual bool DoGet(HttpRequest& request, HttpResponse& response);
39 
40  virtual HttpServlet* GetServlet(HttpRequest& request);
41  virtual HttpSession* GetSession(HttpRequest& request);
42 
43  virtual DWORD CheckSessions();
44 
45  virtual int GetSessionTimeout() const { return session_timeout; }
46  virtual void SetSessionTimeout(int t) { session_timeout = t; }
47 
48 protected:
49  virtual void DoSyncedCheck();
50 
53  HANDLE hsession;
55 };
56 
57 #endif HttpServletExec_h