修正Http-kill位置过完的问题,增加TCP链接摘要日志功能
This commit is contained in:
@@ -50,6 +50,23 @@ struct tfe_conn_private
|
||||
uint8_t on_writing;
|
||||
};
|
||||
|
||||
enum tfe_stream_event_log_type
|
||||
{
|
||||
EVENT_LOG_CLOSE_BY_FD_PEER,
|
||||
EVENT_LOG_CLOSE_BY_FD_EOF,
|
||||
EVENT_LOG_CLOSE_BY_FD_ERROR,
|
||||
EVENT_LOG_CLOSE_BY_SSL_ERROR,
|
||||
__EVENT_LOG_CLOSE_MAX
|
||||
};
|
||||
|
||||
struct tfe_stream_event_log
|
||||
{
|
||||
enum tfe_stream_event_log_type type;
|
||||
enum tfe_conn_dir dir;
|
||||
unsigned int error;
|
||||
const char * str_error;
|
||||
};
|
||||
|
||||
struct tfe_stream_private
|
||||
{
|
||||
struct tfe_stream head;
|
||||
@@ -103,12 +120,20 @@ struct tfe_stream_private
|
||||
bool is_suspended;
|
||||
enum tfe_conn_dir suspended_by;
|
||||
|
||||
/* KILL */
|
||||
bool need_to_be_kill;
|
||||
|
||||
/* KEYRING-ID */
|
||||
unsigned keyring_id;
|
||||
|
||||
/* ONLY FOR LOG */
|
||||
evutil_socket_t log_fd_downstream;
|
||||
evutil_socket_t log_fd_upstream;
|
||||
|
||||
/* EVENT LOG */
|
||||
#define STREAM_EVENT_LOG_MAX 8
|
||||
struct tfe_stream_event_log log_event[STREAM_EVENT_LOG_MAX];
|
||||
unsigned int nr_log_event;
|
||||
};
|
||||
|
||||
static inline void * __STREAM_LOGGER(struct tfe_stream_private * _stream)
|
||||
|
||||
@@ -14,16 +14,19 @@ enum TFE_STAT_FIELD
|
||||
/* FDs */
|
||||
STAT_FD_OPEN_BY_KNI_ACCEPT,
|
||||
STAT_FD_CLOSE_BY_KNI_ACCEPT_FAIL,
|
||||
STAT_FD_CLOSE_BY_EVENT_WRITE,
|
||||
STAT_FD_CLOSE_BY_EVENT_EOF,
|
||||
STAT_FD_CLOSE_BY_EVENT_ERROR,
|
||||
/* FDs */
|
||||
STAT_FD_INSTANT_CLOSE,
|
||||
STAT_FD_DEFER_CLOSE_IN_QUEUE,
|
||||
STAT_FD_DEFER_CLOSE_SUCCESS,
|
||||
/* Stream */
|
||||
STAT_STREAM_CREATE,
|
||||
STAT_STREAM_DESTROY,
|
||||
STAT_STREAM_OPEN,
|
||||
STAT_STREAM_CLS,
|
||||
STAT_STREAM_CLS_DOWN_EOF,
|
||||
STAT_STREAM_CLS_UP_EOF,
|
||||
STAT_STREAM_CLS_DOWN_ERR,
|
||||
STAT_STREAM_CLS_UP_ERR,
|
||||
STAT_STREAM_CLS_KILL,
|
||||
|
||||
/* Stream Protocol */
|
||||
STAT_STREAM_TCP_PLAIN,
|
||||
STAT_STREAM_TCP_SSL,
|
||||
|
||||
Reference in New Issue
Block a user