Sese Framework  2.3.0
A cross-platform framework
Loading...
Searching...
No Matches
Config.h File Reference

Generic profiles. More...

#include <cassert>
#include <cinttypes>
#include <algorithm>
#include <string>
#include <sese/util/Memory.h>
#include <sese/system/Environment.h>

Go to the source code of this file.

Namespaces

namespace  sese
 

Macros

#define SESE_MARCO_END
 
#define SESE_STD_WRAPPER(name, member)    [[nodiscard]] auto name() const { return member.name(); }
 
#define SESE_DEPRECATED   [[deprecated]]
 
#define SESE_DEPRECATED_WITH(x)   [[deprecated(x)]]
 

Variables

static constexpr int32_t TIME_DEFAULT_ZONE = 8
 Default time zone.
 
static constexpr const char * TIME_DEFAULT_PATTERN = "UTCz yyyy-MM-dd HH:mm:ss.ff"
 UTC Match format.
 
static constexpr const char * TIME_GREENWICH_MEAN_PATTERN = "ddd, dd MMM yyyy HH:mm:ss %G%M%T"
 Greenwich Mean Time Matching Format.
 
static constexpr const char * TIME_SHORT_PATTERN = "yyyy-MM-dd%THH:mm:ss.ff%Z"
 Time short format.
 
static constexpr size_t STRING_BUFFER_SIZE_FACTOR = 1024
 String Buffer Unit factor.
 
static constexpr const char * SPACE_CHARS = " \n\r\t\v\b"
 Whitespace characters.
 
static constexpr const char * THREAD_DEFAULT_NAME = "UNKNOWN"
 Default thread name.
 
static constexpr const char * THREAD_MAIN_NAME = "Main"
 The name of the main thread.
 
static constexpr size_t RECORD_OUTPUT_BUFFER = 4096
 The size of the log output buffer.
 
static constexpr const char * RECORD_DEFAULT_TIME_PATTERN = TIME_SHORT_PATTERN
 Log formatter time matching format.
 
static constexpr const char * RECORD_DEFAULT_TEXT_PATTERN = "c lv fn:li tn:th> m\n"
 The log formatter matches the format.
 
static constexpr const char * RECORD_DEFAULT_FILE_TIME_PATTERN = "yyyyMMdd HHmmssff"
 The log output file name matches the pattern.
 
static constexpr const size_t RECORD_BUFFER_SIZE = 4096
 Asynchronous logger buffer size.
 
static constexpr const size_t STREAM_BYTE_STREAM_SIZE_FACTOR = 1024
 Byte stream buffer unit factor.
 
static constexpr bool ENABLE_TEST = false
 Whether to enable debug mode.
 
static constexpr size_t TIMER_WHEEL_NUMBER = 30
 The number of timer time wheels.
 
static constexpr size_t SERVER_DEFAULT_THREADS = 4
 TCP Server default thread pool size.
 
static constexpr size_t SERVER_MAX_CONNECTION = 511
 TCP Server defaults to the listener queue size.
 
static constexpr size_t SERVER_KEEP_ALIVE_DURATION = 10
 TCP Server Keep-Alive duration.
 
static constexpr size_t HTTP_MAX_SINGLE_LINE = 1023
 The maximum size of a single HTTP util.
 
static constexpr const char * HTTPD_NAME = "sese::service::HttpServer"
 Http Server name.
 
static constexpr const char * HTTPD_BOUNDARY = "000000SESE0BOUNDARY000000"
 HTTP multi-segment request boundary.
 
static constexpr const char * HTTP_CLIENT_NAME = "sese::net::http::HttpClient"
 Http Client name.
 
static constexpr size_t ZLIB_CHUNK_SIZE = 1024 * 16
 Compressor Chunk default size.
 
static constexpr size_t IOCP_WSABUF_SIZE = 65535
 The size of the WSABUF carried by the IOCP when delivering the Recv event.
 
static constexpr size_t MTU_VALUE = 1472
 Framework default MTU value.
 
static constexpr size_t DNS_PACKAGE_SIZE = 512
 Framework DNS packet size.
 

Detailed Description

Generic profiles.

Windows Platform Configuration File.

Linux platform configuration file.

Darwin platform configuration file.

Author
kaoru
Date
March 28, 2022

Macro Definition Documentation

◆ SESE_DEPRECATED

#define SESE_DEPRECATED   [[deprecated]]

◆ SESE_DEPRECATED_WITH

#define SESE_DEPRECATED_WITH ( x)    [[deprecated(x)]]

◆ SESE_MARCO_END

#define SESE_MARCO_END
Value:
switch (0) \
case 0: \
default: \
break

◆ SESE_STD_WRAPPER

#define SESE_STD_WRAPPER ( name,
member )    [[nodiscard]] auto name() const { return member.name(); }

Variable Documentation

◆ DNS_PACKAGE_SIZE

size_t DNS_PACKAGE_SIZE = 512
staticconstexpr

Framework DNS packet size.

◆ ENABLE_TEST

bool ENABLE_TEST = false
staticconstexpr

Whether to enable debug mode.

◆ HTTP_CLIENT_NAME

const char* HTTP_CLIENT_NAME = "sese::net::http::HttpClient"
staticconstexpr

Http Client name.

◆ HTTP_MAX_SINGLE_LINE

size_t HTTP_MAX_SINGLE_LINE = 1023
staticconstexpr

The maximum size of a single HTTP util.

Referenced by sese::net::http::HttpUtil::getLine().

◆ HTTPD_BOUNDARY

const char* HTTPD_BOUNDARY = "000000SESE0BOUNDARY000000"
staticconstexpr

◆ HTTPD_NAME

const char* HTTPD_NAME = "sese::service::HttpServer"
staticconstexpr

Http Server name.

◆ IOCP_WSABUF_SIZE

◆ MTU_VALUE

◆ RECORD_BUFFER_SIZE

const size_t RECORD_BUFFER_SIZE = 4096
staticconstexpr

◆ RECORD_DEFAULT_FILE_TIME_PATTERN

const char* RECORD_DEFAULT_FILE_TIME_PATTERN = "yyyyMMdd HHmmssff"
staticconstexpr

The log output file name matches the pattern.

Referenced by getDateTimeString().

◆ RECORD_DEFAULT_TEXT_PATTERN

const char* RECORD_DEFAULT_TEXT_PATTERN = "c lv fn:li tn:th> m\n"
staticconstexpr

The log formatter matches the format.

◆ RECORD_DEFAULT_TIME_PATTERN

const char* RECORD_DEFAULT_TIME_PATTERN = TIME_SHORT_PATTERN
staticconstexpr

Log formatter time matching format.

◆ RECORD_OUTPUT_BUFFER

size_t RECORD_OUTPUT_BUFFER = 4096
staticconstexpr

The size of the log output buffer.

◆ SERVER_DEFAULT_THREADS

size_t SERVER_DEFAULT_THREADS = 4
staticconstexpr

TCP Server default thread pool size.

◆ SERVER_KEEP_ALIVE_DURATION

size_t SERVER_KEEP_ALIVE_DURATION = 10
staticconstexpr

TCP Server Keep-Alive duration.

◆ SERVER_MAX_CONNECTION

size_t SERVER_MAX_CONNECTION = 511
staticconstexpr

TCP Server defaults to the listener queue size.

◆ SPACE_CHARS

const char* SPACE_CHARS = " \n\r\t\v\b"
staticconstexpr

Whitespace characters.

Referenced by sese::isSpace().

◆ STREAM_BYTE_STREAM_SIZE_FACTOR

const size_t STREAM_BYTE_STREAM_SIZE_FACTOR = 1024
staticconstexpr

Byte stream buffer unit factor.

Referenced by sese::io::BaseStreamReader< T >::preRead().

◆ STRING_BUFFER_SIZE_FACTOR

◆ THREAD_DEFAULT_NAME

const char* THREAD_DEFAULT_NAME = "UNKNOWN"
staticconstexpr

Default thread name.

Referenced by sese::Thread::getCurrentThreadName().

◆ THREAD_MAIN_NAME

const char* THREAD_MAIN_NAME = "Main"
staticconstexpr

The name of the main thread.

Referenced by sese::Thread::getCurrentThreadName().

◆ TIME_DEFAULT_PATTERN

const char* TIME_DEFAULT_PATTERN = "UTCz yyyy-MM-dd HH:mm:ss.ff"
staticconstexpr

UTC Match format.

◆ TIME_DEFAULT_ZONE

int32_t TIME_DEFAULT_ZONE = 8
staticconstexpr

Default time zone.

◆ TIME_GREENWICH_MEAN_PATTERN

const char* TIME_GREENWICH_MEAN_PATTERN = "ddd, dd MMM yyyy HH:mm:ss %G%M%T"
staticconstexpr

◆ TIME_SHORT_PATTERN

const char* TIME_SHORT_PATTERN = "yyyy-MM-dd%THH:mm:ss.ff%Z"
staticconstexpr

Time short format.

◆ TIMER_WHEEL_NUMBER

size_t TIMER_WHEEL_NUMBER = 30
staticconstexpr

The number of timer time wheels.

◆ ZLIB_CHUNK_SIZE

size_t ZLIB_CHUNK_SIZE = 1024 * 16
staticconstexpr

Compressor Chunk default size.