Lines Matching refs:gw_fd
490 int gw_fd; in gw_spawn_connection() local
499 gw_fd = fdevent_socket_cloexec(proc->saddr->sa_family, SOCK_STREAM, 0); in gw_spawn_connection()
500 if (-1 == gw_fd) { in gw_spawn_connection()
506 status = connect(gw_fd, proc->saddr, proc->saddrlen); in gw_spawn_connection()
515 close(gw_fd); in gw_spawn_connection()
523 gw_fd = fdevent_socket_cloexec(proc->saddr->sa_family, SOCK_STREAM, 0); in gw_spawn_connection()
524 if (-1 == gw_fd) { in gw_spawn_connection()
529 if (fdevent_set_so_reuseaddr(gw_fd, 1) < 0) { in gw_spawn_connection()
531 close(gw_fd); in gw_spawn_connection()
536 if (-1 == bind(gw_fd, proc->saddr, proc->saddrlen)) { in gw_spawn_connection()
539 close(gw_fd); in gw_spawn_connection()
543 if (-1 == listen(gw_fd, host->listen_backlog)) { in gw_spawn_connection()
545 close(gw_fd); in gw_spawn_connection()
612 env.ptr, gw_fd, -1, -1, dfd) in gw_spawn_connection()
618 close(gw_fd); in gw_spawn_connection()
969 …h_connection(request_st * const r, gw_host *host, gw_proc *proc, pid_t pid, int gw_fd, int debug) { in gw_establish_connection() argument
970 if (-1 == connect(gw_fd, proc->saddr, proc->saddrlen)) { in gw_establish_connection()
989 "connect succeeded: %d", gw_fd); in gw_establish_connection()