--- parser3/src/include/pa_http.h 2020/10/14 11:24:46 1.26 +++ parser3/src/include/pa_http.h 2020/12/16 10:45:09 1.30 @@ -1,14 +1,14 @@ /** @file Parser: commonly used functions. - Copyright (c) 2001-2017 Art. Lebedev Studio (http://www.artlebedev.com) + Copyright (c) 2001-2020 Art. Lebedev Studio (http://www.artlebedev.com) Author: Alexandr Petrosian (http://paf.design.ru) */ #ifndef PA_HTTP_H #define PA_HTTP_H -#define IDENT_PA_HTTP_H "$Id: pa_http.h,v 1.26 2020/10/14 11:24:46 moko Exp $" +#define IDENT_PA_HTTP_H "$Id: pa_http.h,v 1.30 2020/12/16 10:45:09 moko Exp $" #include "pa_vstring.h" #include "pa_vint.h" @@ -99,13 +99,20 @@ public: } bool accept(int, int); - void read_header(); + bool read_header(); size_t read_post(char *, size_t); size_t send_body(const void *, size_t); }; class HTTPD_Server : public PA_Allocated { public: + enum HTTPD_MODE { + SEQUENTIAL, + PARALLEL, + MULTITHREADED + } static mode; + + static void set_mode(const String&); static int bind(const char *); };