Lines Matching refs:fd
1227 if (evcon->fd != -1) { in evhttp_connection_free()
1257 if (evcon->fd == -1) in evhttp_connection_free()
1258 evcon->fd = bufferevent_getfd(evcon->bufev); in evhttp_connection_free()
1263 if (evcon->fd != -1) { in evhttp_connection_free()
1264 shutdown(evcon->fd, EVUTIL_SHUT_WR); in evhttp_connection_free()
1266 evutil_closesocket(evcon->fd); in evhttp_connection_free()
1350 if (evcon->fd == -1) in evhttp_connection_reset_()
1351 evcon->fd = bufferevent_getfd(evcon->bufev); in evhttp_connection_reset_()
1353 if (evcon->fd != -1) { in evhttp_connection_reset_()
1358 shutdown(evcon->fd, EVUTIL_SHUT_WR); in evhttp_connection_reset_()
1359 evutil_closesocket(evcon->fd); in evhttp_connection_reset_()
1360 evcon->fd = -1; in evhttp_connection_reset_()
1393 evhttp_connection_retry(evutil_socket_t fd, short what, void *arg) in evhttp_connection_retry() argument
1484 if (evcon->fd == -1) in evhttp_error_cb()
1485 evcon->fd = bufferevent_getfd(bufev); in evhttp_error_cb()
1493 EV_SOCK_ARG(evcon->fd))); in evhttp_error_cb()
1578 if (evcon->fd == -1) in evhttp_connection_cb()
1579 evcon->fd = bufferevent_getfd(bufev); in evhttp_connection_cb()
1594 if (evcon->fd == -1) { in evhttp_connection_cb()
1601 if (getsockopt(evcon->fd, SOL_SOCKET, SO_ERROR, (void*)&error, in evhttp_connection_cb()
1605 EV_SOCK_ARG(evcon->fd))); in evhttp_connection_cb()
1613 EV_SOCK_ARG(evcon->fd), in evhttp_connection_cb()
1621 EV_SOCK_ARG(evcon->fd))); in evhttp_connection_cb()
2283 __func__, EV_SOCK_ARG(evcon->fd))); in evhttp_read_firstline()
2300 evutil_socket_t fd = evcon->fd; in evhttp_read_header() local
2306 __func__, EV_SOCK_ARG(fd))); in evhttp_read_header()
2326 __func__, EV_SOCK_ARG(fd))); in evhttp_read_header()
2346 __func__, req->remote_host, EV_SOCK_ARG(fd))); in evhttp_read_header()
2355 EV_SOCK_ARG(fd)); in evhttp_read_header()
2391 evcon->fd = -1; in evhttp_connection_base_bufferevent_new()
2580 evcon->fd = bind_socket( in evhttp_connection_connect_()
2582 if (evcon->fd == -1) { in evhttp_connection_connect_()
2588 if (bufferevent_setfd(evcon->bufev, evcon->fd)) in evhttp_connection_connect_()
2628 event_sock_warn(evcon->fd, "%s: connection to \"%s\" failed", in evhttp_connection_connect_()
3561 evutil_socket_t fd; in evhttp_bind_socket_with_handle() local
3565 if ((fd = bind_socket(address, port, 1 /*reuse*/)) == -1) in evhttp_bind_socket_with_handle()
3568 if (listen(fd, 128) == -1) { in evhttp_bind_socket_with_handle()
3570 event_sock_warn(fd, "%s: listen", __func__); in evhttp_bind_socket_with_handle()
3571 evutil_closesocket(fd); in evhttp_bind_socket_with_handle()
3576 bound = evhttp_accept_socket_with_handle(http, fd); in evhttp_bind_socket_with_handle()
3588 evhttp_accept_socket(struct evhttp *http, evutil_socket_t fd) in evhttp_accept_socket() argument
3591 evhttp_accept_socket_with_handle(http, fd); in evhttp_accept_socket()
3609 evhttp_accept_socket_with_handle(struct evhttp *http, evutil_socket_t fd) in evhttp_accept_socket_with_handle() argument
3619 fd); in evhttp_accept_socket_with_handle()
4226 evutil_socket_t fd, struct sockaddr *sa, ev_socklen_t salen) in evhttp_get_request_connection() argument
4247 __func__, hostname, portname, EV_SOCK_ARG(fd))); in evhttp_get_request_connection()
4268 evcon->fd = fd; in evhttp_get_request_connection()
4270 if (bufferevent_setfd(evcon->bufev, fd)) in evhttp_get_request_connection()
4321 evhttp_get_request(struct evhttp *http, evutil_socket_t fd, in evhttp_get_request() argument
4326 evcon = evhttp_get_request_connection(http, fd, sa, salen); in evhttp_get_request()
4328 event_sock_warn(fd, "%s: cannot get connection on "EV_SOCK_FMT, in evhttp_get_request()
4329 __func__, EV_SOCK_ARG(fd)); in evhttp_get_request()
4330 evutil_closesocket(fd); in evhttp_get_request()
4394 evutil_socket_t fd; in create_bind_socket_nonblock() local
4400 fd = evutil_socket_(ai ? ai->ai_family : AF_INET, in create_bind_socket_nonblock()
4402 if (fd == -1) { in create_bind_socket_nonblock()
4407 if (setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, (void *)&on, sizeof(on))<0) in create_bind_socket_nonblock()
4410 if (evutil_make_listen_socket_reuseable(fd) < 0) in create_bind_socket_nonblock()
4415 r = bind(fd, ai->ai_addr, (ev_socklen_t)ai->ai_addrlen); in create_bind_socket_nonblock()
4420 return (fd); in create_bind_socket_nonblock()
4424 evutil_closesocket(fd); in create_bind_socket_nonblock()
4461 evutil_socket_t fd; in bind_socket() local
4473 fd = create_bind_socket_nonblock(aitop, reuse); in bind_socket()
4477 return (fd); in bind_socket()