Make (http) proto_data persistent

PUBLISHED_FROM=8210f4730a3411b3298274d792fc33da79f47b8a
This commit is contained in:
Alexander Alashkin 2016-03-04 09:36:40 +00:00 committed by Marko Mikulicic
parent 672a68219a
commit dbb38fffae
2 changed files with 472 additions and 429 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1075,8 +1075,9 @@ struct mg_connection {
double ev_timer_time; /* Timestamp of the future MG_EV_TIMER */
mg_event_handler_t proto_handler; /* Protocol-specific event handler */
void *proto_data; /* Protocol-specific data */
mg_event_handler_t handler; /* Event handler function */
void *user_data; /* User-specific data */
void (*proto_data_destructor)(void *proto_data);
mg_event_handler_t handler; /* Event handler function */
void *user_data; /* User-specific data */
union {
void *v;
/*
@ -1088,9 +1089,6 @@ struct mg_connection {
void *priv_2; /* Used by mg_enable_multithreading() */
struct mbuf endpoints; /* Used by mg_register_http_endpoint */
void *mgr_data; /* Implementation-specific event manager's data. */
#ifdef MG_ENABLE_HTTP_STREAMING_MULTIPART
struct mbuf strm_state; /* Used by multi-part streaming */
#endif
unsigned long flags;
/* Flags set by Mongoose */
#define MG_F_LISTENING (1 << 0) /* This connection is listening */