整理stream处理流程,适应KNI接口定义。

This commit is contained in:
Lu Qiuwen
2018-08-23 11:23:05 +08:00
committed by Lu
parent 7cccc70b53
commit 405f046b22
10 changed files with 155 additions and 93 deletions

View File

@@ -1,5 +1,7 @@
#pragma once
#include "tfe_future.h"
#include <event2/event.h>
#include <tfe_future.h>
struct ssl_client_hello
{
@@ -7,11 +9,14 @@ struct ssl_client_hello
char* sni;
char* cipher_suites;
};
struct ssl_client_hello* ssl_get_peek_result(future_result_t* result);
void ssl_free_peek_result(struct ssl_client_hello* client_hello);
void ssl_async_peek_client_hello(struct future* future, evutil_socket_t fd, struct event_base *evbase);
void ssl_async_connect_origin(struct future* future, const struct ssl_client_hello* client_hello, evutil_socket_t fd, const char* sni, struct event_base *evbase);
void ssl_async_connect_origin(struct future* future, const struct ssl_client_hello* client_hello,
evutil_socket_t fd, const char* sni, struct event_base *evbase);
struct ssl_downstream * ssl_downstream_create();
void ssl_upstream_free(struct ssl_upstream * p);