Lines Matching refs:bevf
122 /** Return 1 iff bevf's underlying bufferevent's output buffer is at or
126 be_underlying_writebuf_full(struct bufferevent_filtered *bevf,
129 struct bufferevent *u = bevf->underlying;
138 be_readbuf_full(struct bufferevent_filtered *bevf,
141 struct bufferevent *bufev = downcast(bevf);
217 struct bufferevent_filtered *bevf = upcast(bev);
218 EVUTIL_ASSERT(bevf);
219 if (bevf->free_context)
220 bevf->free_context(bevf->context);
222 if (bevf->bev.options & BEV_OPT_CLOSE_ON_FREE) {
228 if (BEV_UPCAST(bevf->underlying)->refcnt < 2) {
232 bufferevent_free(bevf->underlying);
235 if (bevf->underlying) {
236 if (bevf->underlying->errorcb == be_filter_eventcb)
237 bufferevent_setcb(bevf->underlying,
239 bufferevent_unsuspend_read(bevf->underlying,
250 struct bufferevent_filtered *bevf = upcast(bev);
256 bufferevent_unsuspend_read(bevf->underlying,
265 struct bufferevent_filtered *bevf = upcast(bev);
270 bufferevent_suspend_read(bevf->underlying,
277 be_filter_process_input(struct bufferevent_filtered *bevf,
282 struct bufferevent *bev = downcast(bevf);
288 be_readbuf_full(bevf, state))
298 res = bevf->process_in(bevf->underlying->input,
299 bev->input, limit, state, bevf->context);
305 evbuffer_get_length(bevf->underlying->input) &&
306 !be_readbuf_full(bevf, state));
316 be_filter_process_output(struct bufferevent_filtered *bevf,
322 struct bufferevent *bufev = downcast(bevf);
332 be_underlying_writebuf_full(bevf, state) ||
339 evbuffer_cb_set_flags(bufev->output, bevf->outbuf_cb, 0);
348 bevf->underlying->wm_write.high)
349 limit = bevf->underlying->wm_write.high -
350 evbuffer_get_length(bevf->underlying->output);
352 res = bevf->process_out(downcast(bevf)->output,
353 bevf->underlying->output,
356 bevf->context);
368 !be_underlying_writebuf_full(bevf,state));
378 !be_underlying_writebuf_full(bevf, state)) {
385 evbuffer_cb_set_flags(bufev->output,bevf->outbuf_cb,
399 struct bufferevent_filtered *bevf = arg;
400 struct bufferevent *bev = downcast(bevf);
407 be_filter_process_output(bevf, BEV_NORMAL, &processed_any);
416 struct bufferevent_filtered *bevf = _me;
419 struct bufferevent *bufev = downcast(bevf);
424 if (bevf->got_eof)
430 res = be_filter_process_input(bevf, state, &processed_any);
448 struct bufferevent_filtered *bevf = _me;
449 struct bufferevent *bev = downcast(bevf);
453 be_filter_process_output(bevf, BEV_NORMAL, &processed_any);
461 struct bufferevent_filtered *bevf = _me;
462 struct bufferevent *bev = downcast(bevf);
474 struct bufferevent_filtered *bevf = upcast(bufev);
476 EVUTIL_ASSERT(bevf);
481 be_filter_process_input(bevf, mode, &processed_any);
484 be_filter_process_output(bevf, mode, &processed_any);
488 bufferevent_flush(bevf->underlying, iotype, mode);
499 struct bufferevent_filtered *bevf;
502 bevf = upcast(bev);
503 data->ptr = bevf->underlying;