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