Lines Matching defs:sock
35 #include "sock.h"
81 int sock, oldumask;
85 sock = socket(AF_UNIX, SOCK_STREAM, 0);
86 if (sock == -1) {
97 if (bind(sock, (struct sockaddr *)&sockname,
102 if (listen(sock, 1) == -1) {
112 f->fd = sock;
117 close(sock);
220 int sock, opt;
223 while ((sock = accept(f->fd, &caddr, &caddrlen)) == -1) {
230 if (fcntl(sock, F_SETFL, O_NONBLOCK) == -1) {
236 if (setsockopt(sock, IPPROTO_TCP, TCP_NODELAY,
242 if (sock_new(sock) == NULL)
246 close(sock);