增加HTTP业务层、解析层Suspend接口定义。
This commit is contained in:
@@ -132,7 +132,8 @@ int tfe_stream_write(const struct tfe_stream* stream, enum tfe_conn_dir dir, con
|
||||
#define ON_DATA_CALL 1
|
||||
#define ON_CLOSE_CALL 2
|
||||
enum tfe_stream_action tfe_stream_call_plugin(struct tfe_stream_private* _stream, enum tfe_conn_dir dir, int what, struct evbuffer * inbuf)
|
||||
{
|
||||
{
|
||||
|
||||
size_t contigous_len=evbuffer_get_length(inbuf),drain_size=0;
|
||||
const char* contiguous_data=evbuffer_pullup(inbuf,contigous_len);
|
||||
int i=0,ret=0;
|
||||
@@ -233,10 +234,10 @@ static void tfe_stream_readcb(struct bufferevent * bev, void * arg)
|
||||
{
|
||||
_stream->calling_idx=i;
|
||||
plug_ctx=_stream->plug_ctx+i;
|
||||
plug_ctx=_stream->plug_ctx+i;
|
||||
if(_stream->is_first_read==1)
|
||||
{
|
||||
action_tmp=plugins[i].on_open(&_stream.head, _stream->thrmgr_ref->thread_id, dir, contiguous_data,contigous_len, &(plug_ctx->pme));
|
||||
action_tmp=plugins[i].on_open(&_stream.head, _stream->thrmgr_ref->thread_id, dir, contiguous_data,contigous_len, &(plug_ctx->pme));
|
||||
_stream->is_first_read=0;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -248,6 +249,7 @@ static void tfe_stream_readcb(struct bufferevent * bev, void * arg)
|
||||
}
|
||||
}
|
||||
switch (action_final)
|
||||
|
||||
{
|
||||
case ACTION_FORWARD_DATA:
|
||||
if(_stream->forward_bytes>0)
|
||||
@@ -501,7 +503,7 @@ struct tfe_stream_private* tfe_stream_create(evutil_socket_t fd_downstream, evut
|
||||
conn_private->fd_downstream=fd_downstream;
|
||||
conn_private->fd_upstream=fd_upstream;
|
||||
conn_private->thrmgr_ref=thread;
|
||||
conn_private->thrmgr_ref=thread;
|
||||
conn_private->is_first_read=1;
|
||||
conn_public=&(conn_private->head);
|
||||
addr_sock2layer(conn_public->downstream.addr,peeraddr,peeraddrlen);
|
||||
thread->stat.value[STREAM_NUM]++;
|
||||
|
||||
Reference in New Issue
Block a user