Lines Matching refs:client_sd

689 	int client_sd;  in test_xfer_server()  local
695 client_sd = 0; in test_xfer_server()
747 client_sd = accept(sd, (struct sockaddr *) &client_addr, in test_xfer_server()
750 if (client_sd == -1) { in test_xfer_server()
759 rc = read(client_sd, buf, sizeof(buf)); in test_xfer_server()
773 rc = write(client_sd, buf, sizeof(buf)); in test_xfer_server()
787 rc = recv(client_sd, buf, sizeof(buf), 0); in test_xfer_server()
801 rc = send(client_sd, buf, sizeof(buf), 0); in test_xfer_server()
815 rc = recvfrom(client_sd, buf, sizeof(buf), 0, NULL, 0); in test_xfer_server()
829 rc = sendto(client_sd, buf, sizeof(buf), 0, NULL, 0); in test_xfer_server()
840 shutdown(client_sd, SHUT_RDWR); in test_xfer_server()
841 CLOSE(client_sd); in test_xfer_server()
1148 int sd, rc, client_sd, status, on; in test_simple_server() local
1193 client_sd = accept(sd, (struct sockaddr *) &addr, &addr_len); in test_simple_server()
1194 if (client_sd == -1) { in test_simple_server()
1199 rc = read(client_sd, buf, BUFSIZE); in test_simple_server()
1214 rc = write(client_sd, buf, strlen(buf) + 1); in test_simple_server()
1218 rc = close(client_sd); in test_simple_server()
1336 int sd, rc, client_sd, status, on; in test_abort_server() local
1368 client_sd = accept(sd, (struct sockaddr *) &addr, &addr_len); in test_abort_server()
1369 if (client_sd == -1) { in test_abort_server()
1375 rc = read(client_sd, buf, BUFSIZE); in test_abort_server()
1383 rc = close(client_sd); in test_abort_server()
1611 int server_sd, client_sd; in test_nonblock() local
1641 SOCKET(client_sd, info->domain, info->type, 0); in test_nonblock()
1643 fcntl(client_sd, F_SETFL, fcntl(client_sd, F_GETFL) | O_NONBLOCK); in test_nonblock()
1645 if (connect(client_sd, info->clientaddr, info->clientaddrlen) != -1) { in test_nonblock()
1651 check_select_cond(client_sd, 0 /*read*/, 0 /*write*/, 0 /*block*/, in test_nonblock()
1654 if (connect(client_sd, info->clientaddr, info->clientaddrlen) != -1) { in test_nonblock()
1660 if (recv(client_sd, buf, sizeof(buf), 0) != -1 || errno != EAGAIN) in test_nonblock()
1665 if (send(client_sd, buf, sizeof(buf), 0) != -1) { in test_nonblock()
1675 close(client_sd); in test_nonblock()
1680 client_sd = accept(server_sd, (struct sockaddr *) &addr, &len); in test_nonblock()
1681 if (client_sd == -1) in test_nonblock()
1691 if (write(client_sd, buf, 1) != 1) in test_nonblock()
1695 check_select_cond(client_sd, 0 /*read*/, 1 /*write*/, in test_nonblock()
1697 check_select(client_sd, 1 /*read*/, -1 /*write*/, 1 /*block*/); in test_nonblock()
1698 check_select(client_sd, 1 /*read*/, 1 /*write*/, 0 /*block*/); in test_nonblock()
1709 check_select(client_sd, 0 /*read*/, 1 /*write*/, 1 /*block*/); in test_nonblock()
1710 check_select(client_sd, 0 /*read*/, 1 /*write*/, 0 /*block*/); in test_nonblock()
1712 if (connect(client_sd, info->clientaddr, info->clientaddrlen) != -1 || in test_nonblock()
1716 check_select(client_sd, 1 /*read*/, -1 /*write*/, 1 /*block*/); in test_nonblock()
1717 check_select(client_sd, 1 /*read*/, 1 /*write*/, 0 /*block*/); in test_nonblock()
1719 if (read(client_sd, buf, 1) != 1) in test_nonblock()
1722 check_select(client_sd, 0 /*read*/, 1 /*write*/, 0 /*block*/); in test_nonblock()
1724 if (read(client_sd, buf, 1) != -1 || errno != EAGAIN) in test_nonblock()
1730 close(client_sd); in test_nonblock()
1750 int server_sd, client_sd; in test_connect_nb() local
1784 SOCKET(client_sd, info->domain, info->type, 0); in test_connect_nb()
1786 fcntl(client_sd, F_SETFL, fcntl(client_sd, F_GETFL) | O_NONBLOCK); in test_connect_nb()
1788 if (connect(client_sd, info->clientaddr, info->clientaddrlen) != 0) { in test_connect_nb()
1797 close(client_sd); in test_connect_nb()
1830 int server_sd, client_sd; in test_intr() local
1851 SOCKET(client_sd, info->domain, info->type, 0); in test_intr()
1861 if (connect(client_sd, info->clientaddr, info->clientaddrlen) != -1) { in test_intr()
1872 check_select(client_sd, 0 /*read*/, isconn /*write*/, 0 /*block*/); in test_intr()
1877 close(client_sd); in test_intr()
1885 client_sd = accept(server_sd, (struct sockaddr *) &addr, &len); in test_intr()
1886 if (client_sd == -1) in test_intr()
1893 check_select(client_sd, 1 /*read*/, -1 /*write*/, 1 /*block*/); in test_intr()
1894 check_select(client_sd, 1 /*read*/, 1 /*write*/, 0 /*block*/); in test_intr()
1896 if (recv(client_sd, buf, sizeof(buf), 0) != sizeof(buf)) in test_intr()
1900 check_select(client_sd, 0 /*read*/, 1 /*write*/, 0 /*block*/); in test_intr()
1904 fcntl(client_sd, F_SETFL, fcntl(client_sd, F_GETFL) | in test_intr()
1908 while ((r = write(client_sd, buf, sizeof(buf))) > 0); in test_intr()
1916 check_select(client_sd, 0 /*read*/, 0 /*write*/, 0 /*block*/); in test_intr()
1918 if (write(client_sd, buf, 1) != -1) { in test_intr()
1933 if (send(client_sd, buf, sizeof(buf), 0) != sizeof(buf)) in test_intr()
1936 check_select(client_sd, 0 /*read*/, 1 /*write*/, 0 /*block*/); in test_intr()
1943 check_select(client_sd, 1 /*read*/, 1 /*write*/, 0 /*block*/); in test_intr()
1945 close(client_sd); in test_intr()
1960 int server_sd, client_sd, sd, on; in test_connect_close() local
1983 SOCKET(client_sd, info->domain, info->type, 0); in test_connect_close()
1985 fcntl(client_sd, F_SETFL, fcntl(client_sd, F_GETFL) | O_NONBLOCK); in test_connect_close()
1987 if (connect(client_sd, info->clientaddr, info->clientaddrlen) != -1 || in test_connect_close()
1991 check_select_cond(client_sd, 0 /*read*/, 0 /*write*/, 0 /*block*/, in test_connect_close()
1996 close(client_sd); in test_connect_close()
2026 int server_sd, client_sd; in test_listen_close() local
2058 SOCKET(client_sd, info->domain, info->type, 0); in test_listen_close()
2061 if (write(client_sd, &byte, 1) != -1 || errno != ENOTCONN) in test_listen_close()
2064 if (connect(client_sd, info->clientaddr, info->clientaddrlen) != -1) { in test_listen_close()
2075 if (write(client_sd, &byte, 1) != -1 || errno != ENOTCONN) in test_listen_close()
2078 close(client_sd); in test_listen_close()
2097 int server_sd, client_sd; in test_listen_close_nb() local
2129 SOCKET(client_sd, info->domain, info->type, 0); in test_listen_close_nb()
2131 fcntl(client_sd, F_SETFL, fcntl(client_sd, F_GETFL) | O_NONBLOCK); in test_listen_close_nb()
2133 if (connect(client_sd, info->clientaddr, info->clientaddrlen) != -1 || in test_listen_close_nb()
2137 check_select_cond(client_sd, 0 /*read*/, 0 /*write*/, 0 /*block*/, in test_listen_close_nb()
2139 check_select_cond(client_sd, 1 /*read*/, 1 /*write*/, 1 /*block*/, in test_listen_close_nb()
2143 if (write(client_sd, &byte, 1) != -1) { in test_listen_close_nb()
2151 check_select_cond(client_sd, 1 /*read*/, 1 /*write*/, 0 /*block*/, in test_listen_close_nb()
2154 close(client_sd); in test_listen_close_nb()