Lines Matching defs:sock
63 int sock;
69 _ctrl_slave_new(int sock)
76 ns->sock = sock;
99 _ctrl_slave_disconnect(int sock)
108 /* find slave with sock */
109 while (it->next && it->sock != sock)
112 if (it->sock == sock)
115 shutdown(sock, SHUT_RDWR);
116 close(sock);
148 send(slave->sock, "OK\n", 3, 0);
152 send(slave->sock, buf, strlen(buf), 0);
366 FD_SET(it->sock, rfds);
367 *n = MAX(*n, it->sock);
405 if (FD_ISSET(it->sock, rfds))
408 res = recv(it->sock, it->linebuf + offs, CTRL_LINEBUF_SIZE - offs, 0);
409 FD_CLR(it->sock, rfds);
415 _ctrl_slave_disconnect(it->sock);
447 _ctrl_slave_disconnect(it->sock);