增加TCP Keepalive选项设置功能,避免部分fd因网络故障无法淘汰。
This commit is contained in:
@@ -8,26 +8,14 @@ struct ssl_mgr;
|
||||
struct key_keeper;
|
||||
struct kni_acceptor;
|
||||
|
||||
struct tfe_proxy
|
||||
struct tfe_proxy_tcp_options
|
||||
{
|
||||
char name[TFE_SYMBOL_MAX];
|
||||
struct event_base * evbase;
|
||||
struct event * sev[8];
|
||||
struct event * gcev;
|
||||
|
||||
void * logger;
|
||||
|
||||
unsigned int nr_work_threads;
|
||||
struct tfe_thread_ctx * work_threads[TFE_THREAD_MAX];
|
||||
|
||||
unsigned int nr_modules;
|
||||
struct tfe_plugin * modules;
|
||||
|
||||
struct ssl_mgr * ssl_mgr_handler;
|
||||
struct key_keeper * key_keeper_handler;
|
||||
struct kni_acceptor * kni_acceptor_handler;
|
||||
|
||||
unsigned int tcp_all_passthrough;
|
||||
int sz_rcv_buffer;
|
||||
int sz_snd_buffer;
|
||||
int so_keepalive;
|
||||
int tcp_keepidle;
|
||||
int tcp_keepintvl;
|
||||
int tcp_keepcnt;
|
||||
};
|
||||
|
||||
struct tfe_proxy_accept_para
|
||||
@@ -42,6 +30,31 @@ struct tfe_proxy_accept_para
|
||||
bool passthrough;
|
||||
};
|
||||
|
||||
struct tfe_proxy
|
||||
{
|
||||
char name[TFE_SYMBOL_MAX];
|
||||
struct event_base * evbase;
|
||||
struct event * sev[8];
|
||||
struct event * gcev;
|
||||
|
||||
void * logger;
|
||||
unsigned int nr_work_threads;
|
||||
struct tfe_thread_ctx * work_threads[TFE_THREAD_MAX];
|
||||
|
||||
unsigned int nr_modules;
|
||||
struct tfe_plugin * modules;
|
||||
|
||||
struct ssl_mgr * ssl_mgr_handler;
|
||||
struct key_keeper * key_keeper_handler;
|
||||
struct kni_acceptor * kni_acceptor_handler;
|
||||
|
||||
/* DEBUG OPTIONS */
|
||||
unsigned int tcp_all_passthrough;
|
||||
struct tfe_proxy_tcp_options tcp_options;
|
||||
};
|
||||
|
||||
|
||||
|
||||
struct tfe_thread_ctx * tfe_proxy_thread_ctx_acquire(struct tfe_proxy * ctx);
|
||||
void tfe_proxy_thread_ctx_release(struct tfe_thread_ctx * thread_ctx);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user