Lines Matching refs:tcpsock
70 int tcpsock, msgsock ,on, n, *buf;
74 if ((tcpsock = socket(AF_INET, SOCK_STREAM, 0)) < 0)
77 if (setsockopt(tcpsock,
86 if (bind(tcpsock,
90 if (listen(tcpsock, 5) < 0)
98 if ((msgsock = accept(tcpsock,
119 int tcpsock, on;
124 if ((tcpsock = socket(AF_INET, SOCK_STREAM, 0)) < 0)
127 if (setsockopt(tcpsock,
140 r = connect(tcpsock, (struct sockaddr *) &inetaddr,
145 close(tcpsock);
158 if (write(tcpsock, buf, bufsize) < 0) {
162 err(1, "write(%d), %s:%d", tcpsock,