Lines Matching defs:sockfd
51 int sockfd;
56 int str_echo(int sockfd)
61 printf("sockfd = %d\n", sockfd);
64 dprt2(("%s: str_echo(): reading from sockfd %d\n", __FILE__,
65 sockfd));
66 n = readline(sockfd, line, MAXLINE);
76 dprt2(("%s: str_echo(): writing to sockfd = %d\n", __FILE__,
77 sockfd));
78 testint = writen(sockfd, line, n);
100 if ((sockfd = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
105 dprt2(("%s: main(): Open inet stream socket sockfd = %d\n", __FILE__,
106 sockfd));
120 if (bind(sockfd, (struct sockaddr *)&serv_addr, sizeof(serv_addr)) < 0) {
137 listen(sockfd, 5);
145 accept(sockfd, (struct sockaddr *)&cli_addr, &clilen);
164 close(sockfd);