Lines Matching defs:sock
62 int sock;
64 sock = socket(PF_LOCAL, SOCK_STREAM, 0);
65 if (sock < 0) {
76 if (bind(sock, (struct sockaddr *) addr, size) < 0) {
79 close(sock);
83 return sock;
89 int sock;
91 sock = socket(PF_INET, SOCK_STREAM, 0);
92 if (sock < 0) {
103 if (bind(sock, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
106 close(sock);
110 return sock;
889 int sock;
890 sock = accept(waiter->fd, 0, 0);
891 if (sock < 0) {
897 client->ctrl_fd = sock;
900 add_waiter(sock, POLLIN | POLLHUP, client_ctrl_handler, client);
908 int sock;
909 sock = accept(waiter->fd, 0, 0);
910 if (sock < 0) {
916 pending->fd = sock;
918 add_waiter(sock, POLLIN, inet_pending_handler, pending);