Lines Matching refs:tcpfd
828 if ((last_server->tcpfd == -1) && in tcp_request()
829 (last_server->tcpfd = socket(last_server->addr.sa.sa_family, SOCK_STREAM, 0)) != -1 && in tcp_request()
830 (!local_bind(last_server->tcpfd, &last_server->source_addr, in tcp_request()
832 connect(last_server->tcpfd, &last_server->addr.sa, sa_len(&last_server->addr)) == -1)) in tcp_request()
834 close(last_server->tcpfd); in tcp_request()
835 last_server->tcpfd = -1; in tcp_request()
838 if (last_server->tcpfd == -1) in tcp_request()
844 if (!read_write(last_server->tcpfd, &c1, 1, 0) || in tcp_request()
845 !read_write(last_server->tcpfd, &c2, 1, 0) || in tcp_request()
846 !read_write(last_server->tcpfd, packet, size, 0) || in tcp_request()
847 !read_write(last_server->tcpfd, &c1, 1, 1) || in tcp_request()
848 !read_write(last_server->tcpfd, &c2, 1, 1)) in tcp_request()
850 close(last_server->tcpfd); in tcp_request()
851 last_server->tcpfd = -1; in tcp_request()
856 if (!read_write(last_server->tcpfd, packet, m, 1)) in tcp_request()