19 lines
612 B
C
19 lines
612 B
C
|
|
#pragma once
|
||
|
|
|
||
|
|
struct http_half_private * hf_private_create(tfe_http_direction ht_dir, short major, short minor);
|
||
|
|
void hf_private_destory(struct http_half_private * hf_private);
|
||
|
|
|
||
|
|
/** Parse the raw tcp input for HTTP half structure
|
||
|
|
* @param hf_private
|
||
|
|
* hf_private handler.
|
||
|
|
* @param data
|
||
|
|
* raw tcp data, used in the stream's callback.
|
||
|
|
* @param len
|
||
|
|
* raw tcp data length.
|
||
|
|
* @return
|
||
|
|
* 0 for need more data,
|
||
|
|
* 1 for reach the boundary, need to call http business callbacks,
|
||
|
|
* -1 for error.
|
||
|
|
*/
|
||
|
|
int hf_private_parse(struct http_half_private * hf_private, const unsigned char * data, size_t len);
|