Lines Matching refs:tcpfd
821 if ((last_server->tcpfd == -1) &&
822 (last_server->tcpfd = socket(last_server->addr.sa.sa_family, SOCK_STREAM, 0)) != -1 &&
823 (!local_bind(last_server->tcpfd, &last_server->source_addr,
825 connect(last_server->tcpfd, &last_server->addr.sa, sa_len(&last_server->addr)) == -1))
827 close(last_server->tcpfd);
828 last_server->tcpfd = -1;
831 if (last_server->tcpfd == -1)
837 if (!read_write(last_server->tcpfd, &c1, 1, 0) ||
838 !read_write(last_server->tcpfd, &c2, 1, 0) ||
839 !read_write(last_server->tcpfd, packet, size, 0) ||
840 !read_write(last_server->tcpfd, &c1, 1, 1) ||
841 !read_write(last_server->tcpfd, &c2, 1, 1))
843 close(last_server->tcpfd);
844 last_server->tcpfd = -1;
849 if (!read_write(last_server->tcpfd, packet, m, 1))