Lines Matching defs:bev
89 evutil_offsetof(struct bufferevent_private, bev),
108 EVUTIL_UPCAST(bufev, struct bufferevent_private, bev);
127 EVUTIL_UPCAST(bufev, struct bufferevent_private, bev);
206 EVUTIL_UPCAST(bufev, struct bufferevent_private, bev);
336 bufev = &bufev_p->bev;
353 bufferevent_socket_connect(struct bufferevent *bev,
357 EVUTIL_UPCAST(bev, struct bufferevent_private, bev);
364 _bufferevent_incref_and_lock(bev);
369 fd = bufferevent_getfd(bev);
382 if (bufferevent_async_can_connect(bev)) {
383 bufferevent_setfd(bev, fd);
384 r = bufferevent_async_connect(bev, fd, sa, socklen);
400 if (BEV_IS_ASYNC(bev)) {
401 event_assign(&bev->ev_write, bev->ev_base, fd,
402 EV_WRITE|EV_PERSIST, bufferevent_writecb, bev);
405 bufferevent_setfd(bev, fd);
407 if (! be_socket_enable(bev, EV_WRITE)) {
416 event_active(&bev->ev_write, EV_WRITE, 1);
422 event_active(&bev->ev_write, EV_WRITE, 1);
428 _bufferevent_run_eventcb(bev, BEV_EVENT_ERROR);
433 _bufferevent_decref_and_unlock(bev);
441 struct bufferevent *bev = arg;
443 EVUTIL_UPCAST(bev, struct bufferevent_private, bev);
445 BEV_LOCK(bev);
447 bufferevent_unsuspend_write(bev, BEV_SUSPEND_LOOKUP);
448 bufferevent_unsuspend_read(bev, BEV_SUSPEND_LOOKUP);
452 _bufferevent_run_eventcb(bev, BEV_EVENT_ERROR);
453 _bufferevent_decref_and_unlock(bev);
461 r = bufferevent_socket_connect(bev, ai->ai_addr, (int)ai->ai_addrlen);
463 _bufferevent_decref_and_unlock(bev);
468 bufferevent_socket_connect_hostname(struct bufferevent *bev,
475 EVUTIL_UPCAST(bev, struct bufferevent_private, bev);
482 BEV_LOCK(bev);
484 BEV_UNLOCK(bev);
493 bufferevent_suspend_write(bev, BEV_SUSPEND_LOOKUP);
494 bufferevent_suspend_read(bev, BEV_SUSPEND_LOOKUP);
496 bufferevent_incref(bev);
498 &hint, bufferevent_connect_getaddrinfo_cb, bev);
503 bufferevent_unsuspend_write(bev, BEV_SUSPEND_LOOKUP);
504 bufferevent_unsuspend_read(bev, BEV_SUSPEND_LOOKUP);
510 bufferevent_socket_get_dns_error(struct bufferevent *bev)
514 EVUTIL_UPCAST(bev, struct bufferevent_private, bev);
516 BEV_LOCK(bev);
518 BEV_UNLOCK(bev);
568 EVUTIL_UPCAST(bufev, struct bufferevent_private, bev);
585 EVUTIL_UPCAST(bufev, struct bufferevent_private, bev);
613 be_socket_flush(struct bufferevent *bev, short iotype,
684 be_socket_ctrl(struct bufferevent *bev, enum bufferevent_ctrl_op op,
689 be_socket_setfd(bev, data->fd);
692 data->fd = event_get_fd(&bev->ev_read);