Lines Matching defs:sock
69 int sock;
112 void prepare_sock(int sock)
116 setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, (void *) &on, sizeof(on));
119 setsockopt(sock, IPPROTO_TCP, TCP_NOPUSH, (void *) &on, sizeof(on));
122 setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, (void *) &on, sizeof(on));
125 setsockopt(sock, SOL_SOCKET, SO_REUSEPORT, (void *) &on, sizeof(on));
136 setsockopt(sock, SOL_SOCKET, SO_SNDBUF, (void *) &on, sizeof(on));
138 setsockopt(sock, SOL_SOCKET, SO_RCVBUF, (void *) &on, sizeof(on)); // Foxconn added pling 06/19/2009
153 sock = accept(pasvsock, (struct sockaddr *) &foo, (socklen_t *) &namelen);
154 if (sock == -1) {
160 prepare_sock(sock);
162 sock = socket(AF_INET, SOCK_STREAM, 0);
163 prepare_sock(sock);
170 if (bind(sock, (struct sockaddr *) &local, sizeof(local)) < 0) {
178 if (connect(sock, (struct sockaddr *) &sa, sizeof(sa)) == -1) {
276 int sock;
279 sock = socket (PF_LOCAL, SOCK_DGRAM, 0);
287 connect(sock, (struct sockaddr *) &name, size);
289 write(sock, buf, strlen(buf));
291 fflush(sock);
293 close(sock);
464 close(sock);
502 close(sock);
622 char test_abort(char selectbefore, int file, int sock)
639 close(sock);
840 close(sock);
893 close(sock);
934 close(sock);
942 max = (sock > fileno(stdin) ? sock : fileno(stdin)) + 1;
945 FD_SET(sock, &rfds);
951 close(sock);
963 test_abort(0, fd, sock);
973 if (!((i = recv(sock, buffer, my_buffer_size - 1, 0))))
1004 close(sock);
1049 close(sock);
1318 gzfile = gzdopen(sock, "wb");
1321 test_abort(1, phile, sock);
1367 dup2(sock, fileno(stdout));
1404 gzfile = gzdopen(sock, "wb");
1407 test_abort(1, phile, sock);
1460 write(sock, buffer, i);
1461 // test_abort(1, phile, sock);
1503 close(sock);
1510 if (test_abort(1, phile, sock)) {
1519 send_status = send(sock, buffer, i, 0);
1527 close(sock);
1561 close(sock);
1584 datastream = fdopen(sock, "w");