35 parser_.data =
static_cast<DerivedT*
>(
this);
37 last_header_elem_ = None;
64 last_header_elem_ = None;
91 settings.on_message_begin = on_message_begin;
94 settings.on_header_field = on_header_field;
95 settings.on_header_value = on_header_value;
96 settings.on_headers_complete = on_headers_end;
98 settings.on_message_complete = on_message_end;
99 settings.on_chunk_header = on_chunk_header;
100 settings.on_chunk_complete = on_chunk_end;
105 return static_cast<DerivedT*
>(
parser->data)->on_http_message_begin(CyclTime::current())
118 ->on_http_status(CyclTime::current(), {at,
length})
126 if (
obj->last_header_elem_ != Field) {
127 obj->last_header_elem_ = Field;
132 return obj->on_http_header_field(CyclTime::current(), {at,
length}, first) ? 0 : -1;
138 if (
obj->last_header_elem_ != Value) {
139 obj->last_header_elem_ = Value;
144 return obj->on_http_header_value(CyclTime::current(), {at,
length}, first) ? 0 : -1;
148 return static_cast<DerivedT*
>(
parser->data)->on_http_headers_end(CyclTime::current()) ? 0
159 return static_cast<DerivedT*
>(
parser->data)->on_http_message_end(CyclTime::current()) ? 0
166 ->on_http_chunk_header(CyclTime::current(),
parser->content_length)
172 return static_cast<DerivedT*
>(
parser->data)->on_http_chunk_end(CyclTime::current()) ? 0
177 enum { None = 0, Field, Value } last_header_elem_;