Lines Matching refs:socket

862     switch (nxt_socket_connect(task, c->socket.fd, c->remote)) {  in nxt_kqueue_conn_io_connect()
865 c->socket.write_ready = 1; in nxt_kqueue_conn_io_connect()
870 c->socket.write_handler = nxt_kqueue_conn_connected; in nxt_kqueue_conn_io_connect()
871 c->socket.error_handler = nxt_conn_connect_error; in nxt_kqueue_conn_io_connect()
876 nxt_kqueue_enable_write(engine, &c->socket); in nxt_kqueue_conn_io_connect()
899 nxt_debug(task, "kqueue conn connected fd:%d", c->socket.fd); in nxt_kqueue_conn_connected()
901 c->socket.write = NXT_EVENT_BLOCKED; in nxt_kqueue_conn_connected()
920 lev->socket.fd, lev->socket.kq_available); in nxt_kqueue_listen_handler()
922 lev->ready = nxt_min(lev->batch, (uint32_t) lev->socket.kq_available); in nxt_kqueue_listen_handler()
941 lev->socket.read_ready = (lev->ready != 0); in nxt_kqueue_conn_io_accept()
943 lev->socket.kq_available--; in nxt_kqueue_conn_io_accept()
944 lev->socket.read_ready = (lev->socket.kq_available != 0); in nxt_kqueue_conn_io_accept()
952 s = accept(lev->socket.fd, sa, &socklen); in nxt_kqueue_conn_io_accept()
955 c->socket.fd = s; in nxt_kqueue_conn_io_accept()
957 nxt_debug(task, "accept(%d): %d", lev->socket.fd, s); in nxt_kqueue_conn_io_accept()
979 nxt_debug(task, "kqueue conn read fd:%d", c->socket.fd); in nxt_kqueue_conn_io_read()
981 if (c->socket.kq_available == 0 && c->socket.kq_eof) { in nxt_kqueue_conn_io_read()
982 nxt_debug(task, "kevent fd:%d eof", c->socket.fd); in nxt_kqueue_conn_io_read()
984 c->socket.closed = 1; in nxt_kqueue_conn_io_read()
1005 if (c->socket.kq_available == 0 && c->socket.kq_eof) { in nxt_kqueue_conn_io_recvbuf()
1006 c->socket.closed = 1; in nxt_kqueue_conn_io_recvbuf()
1013 c->socket.kq_available -= n; in nxt_kqueue_conn_io_recvbuf()
1015 if (c->socket.kq_available < 0) { in nxt_kqueue_conn_io_recvbuf()
1016 c->socket.kq_available = 0; in nxt_kqueue_conn_io_recvbuf()
1019 nxt_debug(c->socket.task, "kevent fd:%d avail:%D eof:%d", in nxt_kqueue_conn_io_recvbuf()
1020 c->socket.fd, c->socket.kq_available, c->socket.kq_eof); in nxt_kqueue_conn_io_recvbuf()
1022 c->socket.read_ready = (c->socket.kq_available != 0 in nxt_kqueue_conn_io_recvbuf()
1023 || c->socket.kq_eof); in nxt_kqueue_conn_io_recvbuf()