|
CoreComponents 3.0.0
A Modern C++ Toolkit
|
Configuration for the HTTP server. More...
#include <cc/HttpServerConfig>
Public Member Functions | |
| HttpServerConfig ()=default | |
| Create a null HTTP server configuration. | |
| HttpServerConfig (const MetaObject &config) | |
| Load a HTTP server configuration from config. | |
| HttpServerConfig (const String &text) | |
| Load a HTTP server configuration by parsing text (YASON format) | |
| void | addDirectoryInstance (const String &path) |
| Add an instance of the directory service serving files from path. | |
| void | addEchoInstance () |
| Add an instance of the echo service. | |
| List< SocketAddress > | address () const |
| List of socket addresses the server is listening on | |
| bool | forceSecureTransport () const |
| Transport layer security is required | |
| long | securePort () const |
| Configured TLS port. | |
| String | user () const |
| Name of user to switch to for server operation. | |
| String | group () const |
| Name of group to switch to for server operation. | |
| String | version () const |
| HTTP server version string (server identification) | |
| bool | daemon () const |
| Daemonize process on server startup. | |
| String | daemonName () const |
| String | pidPath () const |
| File path to use to store the process ID | |
| long | concurrency () const |
| Number of parallel connections to serve simultanously. | |
| long | serviceWindow () const |
| long | connectionLimit () const |
| Maximum number of simultanous connections allowed from a single source. | |
| double | connectionTimeout () const |
| Maximum time to wait for a request on a stale connection. | |
| int | connectionTimeoutMs () const |
| TlsServerOptions | tlsOptions () const |
| TLS options. | |
| const HttpLoggingServiceInstance & | errorLoggingInstance () const |
| const HttpLoggingServiceInstance & | accessLoggingInstance () const |
| List< HttpServiceInstance > | serviceInstances () const |
| Configured HTTP service instances. | |
| HttpServiceInstance | selectService (const String &host, const String &uri="") const |
Public Member Functions inherited from Object | |
| Object ()=default | |
| Create a null object. | |
| operator bool () const | |
| Check if this is a non-null object. | |
| bool | isNull () const |
| Check if this is a null object. | |
| template<class T > | |
| bool | is () const |
| Check if this object is of type T. | |
| template<class T > | |
| T | as () const |
| Cast this object to type T. | |
| bool | isWeak () const |
| Check if the underlying object reference is weak. | |
| bool | operator== (const Object &other) const |
| Equality operator. | |
| std::strong_ordering | operator<=> (const Object &other) const |
| Ordering operator. | |
| long | useCount () const |
| Reference count. | |
Static Public Member Functions | |
| static MetaObject | prototype () |
| HTTP server configuration prototype. | |
| static MetaObject | parse (const String &text) |
| Parse HTTP sever configuration from text. | |
Additional Inherited Members | |
Protected Member Functions inherited from Object | |
| template<class T > | |
| T | weak () const |
| template<class T > | |
| void | initOnce () |
| Create the object state when called the first time. | |
| template<class T > | |
| void | initOncePerThread () |
| Create a distinct object state for each thread when called the first time in that thread. | |
| Object (State *newState) | |
| Initialize object with newState. | |
| Object (State *state, Alias) | |
| Object (State *state, Weak) | |
| Object & | operator= (std::nullptr_t) |
Static Protected Member Functions inherited from Object | |
| template<class T > | |
| static T | alias (const State *state) |
| Create an alias object for the given state. | |
| template<class T > | |
| static T | weak (const State *state) |
Protected Attributes inherited from Object | |
| Handle< State > | me |
| Internal object state | |
Configuration for the HTTP server.
|
default |
Create a null HTTP server configuration.
|
explicit |
Load a HTTP server configuration from config.
|
explicit |
Load a HTTP server configuration by parsing text (YASON format)
|
static |
HTTP server configuration prototype.
|
static |
Parse HTTP sever configuration from text.
| void addDirectoryInstance | ( | const String & | path | ) |
Add an instance of the directory service serving files from path.
| void addEchoInstance | ( | ) |
Add an instance of the echo service.
| List< SocketAddress > address | ( | ) | const |
List of socket addresses the server is listening on
| bool forceSecureTransport | ( | ) | const |
Transport layer security is required
| long securePort | ( | ) | const |
Configured TLS port.
| String user | ( | ) | const |
Name of user to switch to for server operation.
| String group | ( | ) | const |
Name of group to switch to for server operation.
| String version | ( | ) | const |
HTTP server version string (server identification)
| bool daemon | ( | ) | const |
Daemonize process on server startup.
| String pidPath | ( | ) | const |
File path to use to store the process ID
| long concurrency | ( | ) | const |
Number of parallel connections to serve simultanously.
| long connectionLimit | ( | ) | const |
Maximum number of simultanous connections allowed from a single source.
| double connectionTimeout | ( | ) | const |
Maximum time to wait for a request on a stale connection.
| TlsServerOptions tlsOptions | ( | ) | const |
TLS options.
| List< HttpServiceInstance > serviceInstances | ( | ) | const |
Configured HTTP service instances.