Lines Matching refs:conn_fd

211   int conn_fd;  member
1029 …connections[cnum].conn_fd = socket(urls[url_num].sock_family, urls[url_num].sock_type, urls[url… in start_socket()
1030 if (connections[cnum].conn_fd < 0) { in start_socket()
1037 flags = fcntl(connections[cnum].conn_fd, F_GETFL, 0); in start_socket()
1040 (void)close(connections[cnum].conn_fd); in start_socket()
1043 if (fcntl(connections[cnum].conn_fd, F_SETFL, flags | O_NDELAY) < 0) { in start_socket()
1045 (void)close(connections[cnum].conn_fd); in start_socket()
1052 …if (bind(connections[cnum].conn_fd, (struct sockaddr *)&sips[sip_num].sa, sizeof(sips[sip_num].sa)… in start_socket()
1054 (void)close(connections[cnum].conn_fd); in start_socket()
1061 fprintf(stderr, "Adding FD %d for CNUM %d\n", connections[cnum].conn_fd, cnum); in start_socket()
1063 if (epoll_ctl(epfd, EPOLL_CTL_ADD, connections[cnum].conn_fd, &ev)) { in start_socket()
1065 (void)close(connections[cnum].conn_fd); in start_socket()
1072 …if (connect(connections[cnum].conn_fd, (struct sockaddr *)&connections[cnum].sa, connections[cnum]… in start_socket()
1078 if (epoll_ctl(epfd, EPOLL_CTL_DEL, connections[cnum].conn_fd, &ev) < 0) in start_socket()
1081 (void)close(connections[cnum].conn_fd); in start_socket()
1100 r = write(connections[cnum].conn_fd, urls[url_num].buf, urls[url_num].buf_bytes); in start_socket()
1136 …if (connect(connections[cnum].conn_fd, (struct sockaddr *)&connections[cnum].sa, connections[cnum]… in handle_connect()
1145 …if (getsockopt(connections[cnum].conn_fd, SOL_SOCKET, SO_ERROR, (void *)&err, (socklen_t *)&errlen… in handle_connect()
1186 flags = fcntl(connections[cnum].conn_fd, F_GETFL, 0); in handle_connect()
1188 (void)fcntl(connections[cnum].conn_fd, F_SETFL, flags & ~(int)O_NDELAY); in handle_connect()
1190 SSL_set_fd(connections[cnum].ssl, connections[cnum].conn_fd); in handle_connect()
1204 fprintf(stderr, "Mod FD %d to read for CNUM %d\n", connections[cnum].conn_fd, cnum); in handle_connect()
1206 if (epoll_ctl(epfd, EPOLL_CTL_MOD, connections[cnum].conn_fd, &ev)) { in handle_connect()
1208 (void)close(connections[cnum].conn_fd); in handle_connect()
1218 r = write(connections[cnum].conn_fd, urls[url_num].buf, urls[url_num].buf_bytes); in handle_connect()
1262 bytes_read = read(connections[cnum].conn_fd, buf, bytes_to_read - 1); in handle_read()
2803 if (epoll_ctl(epfd, EPOLL_CTL_DEL, connections[cnum].conn_fd, &ev) < 0) in close_connection()
2807 (void)close(connections[cnum].conn_fd); in close_connection()