HTTP-2-lib
h2_server.hpp
Go to the documentation of this file.
1 // h2_server.hpp
2 
3 #include "../../src/h2_structs.hpp"
4 
5 class h2_server {
6 public:
7  h2_server(const char *certKeyFile, const char *certFile);
8  static void setPublicDir(string dir);
9  static void addRoute(string path, string filepath);
10  void run(const char *port);
11  static void enableCommentsPrint(bool enable);
12  static void enableTrackersPrint(bool enable);
13  static void enableFramesPrint(bool enable);
14 
15 private:
16  static void serverListen(struct event_base *eventBase, const char *port, ApplicationContext *appCtx);
17  struct event_base *eventBase;
18  SSL_CTX *sslCtx;
19 };
Struct for holding the application wide context.
Definition: h2_structs.hpp:13
static void enableCommentsPrint(bool enable)
Definition: h2_server.cpp:39
Definition: h2_server.hpp:5
static void addRoute(string path, string filepath)
Definition: h2_server.cpp:74
void run(const char *port)
Definition: h2_server.cpp:124
static void setPublicDir(string dir)
Definition: h2_server.cpp:64
h2_server(const char *certKeyFile, const char *certFile)
Definition: h2_server.cpp:23
static void enableFramesPrint(bool enable)
Definition: h2_server.cpp:55
struct ApplicationContext appCtx
Definition: h2_server.cpp:16
static void enableTrackersPrint(bool enable)
Definition: h2_server.cpp:47