Lines Matching refs:tcpfd
711 if ((last_server->tcpfd == -1) && in tcp_request()
712 (last_server->tcpfd = in tcp_request()
714 (!local_bind(last_server->tcpfd, &last_server->source_addr, in tcp_request()
716 connect(last_server->tcpfd, &last_server->addr.sa, in tcp_request()
718 close(last_server->tcpfd); in tcp_request()
719 last_server->tcpfd = -1; in tcp_request()
722 if (last_server->tcpfd == -1) continue; in tcp_request()
727 if (!read_write(last_server->tcpfd, &c1, 1, 0) || in tcp_request()
728 !read_write(last_server->tcpfd, &c2, 1, 0) || in tcp_request()
729 !read_write(last_server->tcpfd, packet, size, 0) || in tcp_request()
730 !read_write(last_server->tcpfd, &c1, 1, 1) || in tcp_request()
731 !read_write(last_server->tcpfd, &c2, 1, 1)) { in tcp_request()
732 close(last_server->tcpfd); in tcp_request()
733 last_server->tcpfd = -1; in tcp_request()
738 if (!read_write(last_server->tcpfd, packet, m, 1)) return packet; in tcp_request()