DABC (Data Acquisition Backbone Core)  2.9.9
FastCgi.h
Go to the documentation of this file.
1 // $Id: FastCgi.h 3862 2018-05-11 10:06:18Z linev $
2 
3 /************************************************************
4  * The Data Acquisition Backbone Core (DABC) *
5  ************************************************************
6  * Copyright (C) 2009 - *
7  * GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
8  * Planckstr. 1, 64291 Darmstadt, Germany *
9  * Contact: http://dabc.gsi.de *
10  ************************************************************
11  * This software can be used under the GPL license *
12  * agreements as stated in LICENSE.txt file *
13  * which is part of the distribution. *
14  ************************************************************/
15 
16 #ifndef HTTP_FastCgi
17 #define HTTP_FastCgi
18 
19 #ifndef HTTP_Server
20 #include "http/Server.h"
21 #endif
22 
23 #ifndef DABC_threads
24 #include "dabc/threads.h"
25 #endif
26 
27 namespace http {
28 
33  class FastCgi : public Server {
34  protected:
35  int fCgiPort;
36  bool fDebugMode;
37  int fSocket;
39 
40  virtual void OnThreadAssigned();
41  public:
42  FastCgi(const std::string &name, dabc::Command cmd = nullptr);
43  virtual ~FastCgi();
44 
45  virtual const char* ClassName() const { return "FastCgiServer"; }
46 
47  static void* RunFunc(void* arg);
48  };
49 }
50 
51 #endif
Represents command with its arguments.
Definition: Command.h:99
class represents posix pthread functionality
Definition: threads.h:340
Server provides fastcgi access to DABC
Definition: FastCgi.h:33
int fCgiPort
configured fast cgi port, default 9000
Definition: FastCgi.h:35
bool fDebugMode
when true, only debug info returned by server
Definition: FastCgi.h:36
virtual const char * ClassName() const
Returns class name of the object instance.
Definition: FastCgi.h:45
virtual void OnThreadAssigned()
Definition: FastCgi.cxx:116
int fSocket
fastcgi server socket
Definition: FastCgi.h:37
virtual ~FastCgi()
Definition: FastCgi.cxx:100
static void * RunFunc(void *arg)
Definition: FastCgi.cxx:139
FastCgi(const std::string &name, dabc::Command cmd=nullptr)
Definition: FastCgi.cxx:89
dabc::PosixThread * fThrd
thread where fastcgi mainloop will run
Definition: FastCgi.h:38
Server provides http access to DABC
Definition: Server.h:31
Support of HTTP in DABC.
Definition: Civetweb.h:25