Home | History | Annotate | Download | only in tests

Lines Matching defs:sock

18 socket_close(int  sock)
21 close(sock);
30 int sock = socket(AF_INET, type, 0);
31 if (sock < 0) {
43 if (TEMP_FAILURE_RETRY(bind(sock, &addr, sizeof(addr))) < 0) {
44 socket_close(sock);
49 if (TEMP_FAILURE_RETRY(listen(sock, 4)) < 0) {
50 socket_close(sock);
55 return sock;
60 int sock, client;
64 sock = socket_loopback_server( port, SOCK_STREAM );
65 if (sock < 0) {
70 client = accept(sock, NULL, NULL);