Lines Matching refs:bev
161 http_readcb(struct bufferevent *bev, void *arg) in http_readcb() argument
165 event_debug(("%s: %s\n", __func__, EVBUFFER_DATA(bev->input))); in http_readcb()
167 if (evbuffer_find(bev->input, in http_readcb()
173 done = evhttp_parse_firstline(req, bev->input); in http_readcb()
177 done = evhttp_parse_headers(req, bev->input); in http_readcb()
188 bufferevent_disable(bev, EV_READ); in http_readcb()
197 http_writecb(struct bufferevent *bev, void *arg) in http_writecb() argument
199 if (EVBUFFER_LENGTH(bev->output) == 0) { in http_writecb()
201 bufferevent_enable(bev, EV_READ); in http_writecb()
207 http_errorcb(struct bufferevent *bev, short what, void *arg) in http_errorcb() argument
297 struct bufferevent *bev = arg; in http_complete_write() local
301 bufferevent_write(bev, http_request, strlen(http_request)); in http_complete_write()
308 struct bufferevent *bev; in http_basic_test() local
327 bev = bufferevent_new(fd, http_readcb, http_writecb, in http_basic_test()
335 bufferevent_write(bev, http_request, strlen(http_request)); in http_basic_test()
338 event_once(-1, EV_TIMEOUT, http_complete_write, bev, &tv); in http_basic_test()
348 bufferevent_free(bev); in http_basic_test()
354 bev = bufferevent_new(fd, http_readcb, http_writecb, in http_basic_test()
363 bufferevent_write(bev, http_request, strlen(http_request)); in http_basic_test()
367 bufferevent_free(bev); in http_basic_test()
795 http_failure_readcb(struct bufferevent *bev, void *arg) in http_failure_readcb() argument
798 if (evbuffer_find(bev->input, (const unsigned char*) what, strlen(what)) != NULL) { in http_failure_readcb()
800 bufferevent_disable(bev, EV_READ); in http_failure_readcb()
811 struct bufferevent *bev; in http_failure_test() local
824 bev = bufferevent_new(fd, http_failure_readcb, http_writecb, in http_failure_test()
829 bufferevent_write(bev, http_request, strlen(http_request)); in http_failure_test()
833 bufferevent_free(bev); in http_failure_test()
1078 struct bufferevent *bev; in http_base_test() local
1099 bev = bufferevent_new(fd, http_readcb, http_writecb, in http_base_test()
1101 bufferevent_base_set(base, bev); in http_base_test()
1109 bufferevent_write(bev, http_request, strlen(http_request)); in http_base_test()
1113 bufferevent_free(bev); in http_base_test()
1134 http_chunked_readcb(struct bufferevent *bev, void *arg) in http_chunked_readcb() argument
1140 http_chunked_errorcb(struct bufferevent *bev, short what, void *arg) in http_chunked_errorcb() argument
1153 done = evhttp_parse_firstline(req, EVBUFFER_INPUT(bev)); in http_chunked_errorcb()
1157 done = evhttp_parse_headers(req, EVBUFFER_INPUT(bev)); in http_chunked_errorcb()
1169 header = evbuffer_readline(EVBUFFER_INPUT(bev)); in http_chunked_errorcb()
1177 if (strncmp((char *)EVBUFFER_DATA(EVBUFFER_INPUT(bev)), in http_chunked_errorcb()
1181 evbuffer_drain(EVBUFFER_INPUT(bev), 13 + 2); in http_chunked_errorcb()
1183 header = evbuffer_readline(EVBUFFER_INPUT(bev)); in http_chunked_errorcb()
1191 if (strncmp((char *)EVBUFFER_DATA(EVBUFFER_INPUT(bev)), in http_chunked_errorcb()
1195 evbuffer_drain(EVBUFFER_INPUT(bev), 18 + 2); in http_chunked_errorcb()
1197 header = evbuffer_readline(EVBUFFER_INPUT(bev)); in http_chunked_errorcb()
1205 if (strncmp((char *)EVBUFFER_DATA(EVBUFFER_INPUT(bev)), in http_chunked_errorcb()
1209 evbuffer_drain(EVBUFFER_INPUT(bev), 8 + 2); in http_chunked_errorcb()
1211 header = evbuffer_readline(EVBUFFER_INPUT(bev)); in http_chunked_errorcb()
1227 http_chunked_writecb(struct bufferevent *bev, void *arg) in http_chunked_writecb() argument
1229 if (EVBUFFER_LENGTH(EVBUFFER_OUTPUT(bev)) == 0) { in http_chunked_writecb()
1231 bufferevent_enable(bev, EV_READ); in http_chunked_writecb()
1269 struct bufferevent *bev; in http_chunked_test() local
1286 bev = bufferevent_new(fd, in http_chunked_test()
1296 bufferevent_write(bev, http_request, strlen(http_request)); in http_chunked_test()
1355 struct bufferevent *bev; in http_multi_line_header_test() local
1368 bev = bufferevent_new(fd, http_readcb, http_writecb, in http_multi_line_header_test()
1381 bufferevent_write(bev, http_start_request, strlen(http_start_request)); in http_multi_line_header_test()
1385 bufferevent_free(bev); in http_multi_line_header_test()