summaryrefslogtreecommitdiffhomepage
path: root/NetEx/HttpServletExec.h
blob: bead257cb0adf62818cfaab0577b887eb27a0ac5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/*  Project nGenEx
    Destroyer Studios LLC
    Copyright © 1997-2004. All Rights Reserved.

    SUBSYSTEM:    NetEx.lib
    FILE:         HttpServletExec.h
    AUTHOR:       John DiCamillo


    OVERVIEW
    ========
    Network Server Pump for HTTP Server
*/


#ifndef HttpServletExec_h
#define HttpServletExec_h

#include "HttpServer.h"

// +-------------------------------------------------------------------+

class HttpServlet;
class HttpSession;

// +-------------------------------------------------------------------+

class HttpServletExec : public HttpServer
{
public:
   static const char* TYPENAME() { return "HttpServletExec"; }

   HttpServletExec(WORD port, int poolsize=1);
   virtual ~HttpServletExec();

   int operator == (const HttpServletExec& l) const { return addr == l.addr; }

   virtual bool         DoGet(HttpRequest& request,  HttpResponse& response);

   virtual HttpServlet* GetServlet(HttpRequest& request);
   virtual HttpSession* GetSession(HttpRequest& request);

   virtual DWORD        CheckSessions();

   virtual int          GetSessionTimeout()  const { return session_timeout; }
   virtual void         SetSessionTimeout(int t)   { session_timeout = t;    }

protected:
   virtual void         DoSyncedCheck();

   List<HttpSession>    sessions;
   int                  session_timeout;
   HANDLE               hsession;
   bool                 exec_shutdown;
};

#endif HttpServletExec_h