mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-31 13:00:49 +00:00
Rename struct mg_connection::label -> data. Make its size configurable
This commit is contained in:
1 parent
3d75d71767
commit
da5e8e9778
27 files changed
+3204
-2247
No files matched your search
+7
-5
@@ -658,14 +658,16 @@ struct timeval {
|
||||
#define MG_ENABLE_PACKED_FS 0
|
||||
#endif
|
||||
|
||||
// Granularity of the send/recv IO buffer growth
|
||||
#ifndef MG_IO_SIZE
|
||||
#define MG_IO_SIZE 2048
|
||||
#define MG_IO_SIZE 2048 // Granularity of the send/recv IO buffer growth
|
||||
#endif
|
||||
|
||||
// Maximum size of the recv IO buffer
|
||||
#ifndef MG_MAX_RECV_SIZE
|
||||
#define MG_MAX_RECV_SIZE (3 * 1024 * 1024)
|
||||
#define MG_MAX_RECV_SIZE (3 * 1024 * 1024) // Maximum recv IO buffer size
|
||||
#endif
|
||||
|
||||
#ifndef MG_DATA_SIZE
|
||||
#define MG_DATA_SIZE 32 // struct mg_connection :: data size
|
||||
#endif
|
||||
|
||||
#ifndef MG_MAX_HTTP_HEADERS
|
||||
@@ -1057,7 +1059,7 @@ struct mg_connection {
|
||||
void *fn_data; // User-specified function parameter
|
||||
mg_event_handler_t pfn; // Protocol-specific handler function
|
||||
void *pfn_data; // Protocol-specific function parameter
|
||||
char label[50]; // Arbitrary label
|
||||
char data[MG_DATA_SIZE]; // Arbitrary connection data
|
||||
void *tls; // TLS specific data
|
||||
unsigned is_listening : 1; // Listening connection
|
||||
unsigned is_client : 1; // Outbound (client) connection
|
||||
|
||||
Reference in new issue
Block a user