增加TCP Passthrough功能实现,调通明文转发流程。

This commit is contained in:
Lu Qiuwen
2018-08-30 15:53:41 +08:00
parent e9ebe512c7
commit c15be5af0e
9 changed files with 401 additions and 244 deletions

View File

@@ -3,6 +3,13 @@
#include <platform.h>
struct tfe_stream * tfe_stream_create(struct tfe_proxy * pxy, struct tfe_thread_ctx * thread_ctx);
void tfe_stream_init_by_fds(struct tfe_stream * stream, enum tfe_session_proto session_type,
evutil_socket_t fd_downstream, evutil_socket_t fd_upstream);
enum tfe_stream_option
{
TFE_STREAM_OPT_SESSION_TYPE,
TFE_STREAM_OPT_PASSTHROUGH
};
int tfe_stream_option_set(struct tfe_stream * stream, enum tfe_stream_option opt, const void * arg, size_t sz_arg);
void tfe_stream_init_by_fds(struct tfe_stream * stream, evutil_socket_t fd_downstream, evutil_socket_t fd_upstream);
void tfe_stream_destory(struct tfe_stream_private * stream);