Go to the documentation of this file. 1 #ifndef MJPG_STREAMER_HttpServer_H
2 #define MJPG_STREAMER_HttpServer_H
10 #define BUFFER_SIZE 1024
13 #define HTTP_SERVER_BOUNDARY "_mjpg_boundarydonotcross"
20 #define MAX_FRAME_SIZE (256*1024)
21 #define TEN_K (10*1024)
32 #define STD_HEADER "Connection: close\r\n" \
33 "Server: MJPG-Streamer/0.2\r\n" \
34 "Cache-Control: no-store, no-cache, must-revalidate, pre-check=0, post-check=0, max-age=0\r\n" \
35 "Pragma: no-cache\r\n" \
36 "Expires: Mon, 3 Jan 2000 12:34:56 GMT\r\n"
54 {
".html",
"text/html" },
55 {
".htm",
"text/html" },
56 {
".css",
"text/css" },
57 {
".js",
"text/javascript" },
58 {
".txt",
"text/plain" },
59 {
".jpg",
"image/jpeg" },
60 {
".jpeg",
"image/jpeg" },
61 {
".png",
"image/png"},
62 {
".gif",
"image/gif" },
63 {
".ico",
"image/x-icon" },
64 {
".swf",
"application/x-shockwave-flash" },
65 {
".cab",
"application/x-shockwave-flash" },
66 {
".jar",
"application/java-archive" },
67 {
".json",
"application/json" }
118 unique_ptr<CscLogger>
logger =
nullptr;
123 vector<weak_ptr<ClientContext>> clients;
127 void sendError(
int fd,
int which,
const string &message);
136 bool stopped =
false;
Definition: HttpServer.h:94
int level
Definition: HttpServer.h:95
answer_t type
Definition: HttpServer.h:87
Definition: FrameSource.h:94
answer_t
Definition: HttpServer.h:71
#define IO_BUFFER
Definition: HttpServer.h:9
const char * mimetype
Definition: HttpServer.h:52
#define CSC_DLL_IMPORTEXPORT
Definition: os.h:34
@ A_COMMAND
Definition: HttpServer.h:75
@ A_INPUT_JSON
Definition: HttpServer.h:77
Definition: HttpServer.h:86
Definition: HttpServer.h:134
@ A_STREAM
Definition: HttpServer.h:74
const char * dot_extension
Definition: HttpServer.h:51
static std::unique_ptr< CscLogger > logger
Definition: gltfHelpers.cpp:6
char * parameter
Definition: HttpServer.h:88
char * client
Definition: HttpServer.h:89
const int fd
Definition: HttpServer.h:135
Definition: CscMJPGStreamer.cpp:32
@ A_FILE
Definition: HttpServer.h:76
@ A_PROGRAM_JSON
Definition: HttpServer.h:79
@ A_OUTPUT_JSON
Definition: HttpServer.h:78
@ A_UNKNOWN
Definition: HttpServer.h:72
@ A_SNAPSHOT
Definition: HttpServer.h:73
Definition: HttpServer.h:101
static const struct conscience_core::mjpg_streamer::@0 mimetypes[]
char * credentials
Definition: HttpServer.h:90
std::shared_ptr< T > ptr
Definition: CscCommon.h:29
ClientContext(int fd)
Definition: HttpServer.h:137