Lines Matching defs:sfd
77 int sfd, new_sfd;
84 if ((sfd = socket(AF_INET, SOCK_STREAM, 0)) <= 0) {
92 if (setsockopt(sfd, SOL_SOCKET, SO_REUSEADDR, &on,
105 if (bind(sfd, (struct sockaddr *)&serv_addr,
112 (void) listen(sfd, 5);
114 new_sfd = accept(sfd, (struct sockaddr *)&cli_addr, &cliLen);
124 close(sfd);
139 (void) close(sfd);
145 (void) close(sfd);
152 while (connect(sfd, (struct sockaddr *)&sin,
154 close(sfd);
157 sfd = socket(AF_INET, SOCK_STREAM, 0);
158 if (sfd < 0) {
171 sh->sockfd = sfd;