Lines Matching defs:buf
42 char buf[MAXDATASIZE];
98 if (fgets(buf, MAXDATASIZE, stdin) == NULL) {
103 if (!strcmp(buf, "full\n")) {
107 buf[i] = 'a' + (i % 26);
109 buf[MAXDATASIZE - 2] = '\n';
110 buf[MAXDATASIZE - 1] = '\0';
113 if (send(new_fd, buf, strlen(buf), 0) == -1) {
122 if ((numBytes = recv(new_fd, buf, MAXDATASIZE, 0)) == -1) {
129 buf[numBytes] = '\0';
131 printf("%s:| %s", inet_ntoa(their_addr.sin_addr), buf);