Lines Matching refs:len

96 	int len = 0;  in read_data()  local
99 len = read(pfd, buf, size); in read_data()
101 if (len < 0) in read_data()
104 return len; in read_data()
179 socklen_t len = sizeof(consumer_addr); in main() local
213 pfd = accept(lfd, (struct sockaddr *) &paddr, &len); in main()
226 len = read_data(pfd, buf, 1024); in main()
227 if (!signal_recvd || len != 63 || oob != '@') { in main()
229 signal_recvd, len, oob); in main()
242 len = 0; in main()
243 while (len < 70) in main()
244 len = recv(pfd, buf, 1024, MSG_PEEK); in main()
245 len = read_data(pfd, buf, 1024); in main()
247 if (!signal_recvd || len != 127 || oob != '#') { in main()
249 signal_recvd, len, oob); in main()
265 len = 0; in main()
267 while (len < 150) in main()
268 len = recv(pfd, buf, 1024, MSG_PEEK); in main()
269 len = read_data(pfd, buf, 1024); in main()
273 if (!signal_recvd || len != 127 || oob != '%' || atmark != 1) { in main()
276 signal_recvd, len, oob, atmark); in main()
282 len = read_data(pfd, buf, 1024); in main()
283 if (len != 64) { in main()
285 signal_recvd, len, oob); in main()
305 len = read_data(pfd, buf, 1024); in main()
306 if ((len == -1) && (errno == 11)) in main()
307 len = 0; in main()
311 if (!signal_recvd || len != 0 || oob != '@') { in main()
313 signal_recvd, len, oob); in main()
337 len = read_data(pfd, buf, 1024); in main()
339 if (!signal_recvd || len != 63) { in main()
341 signal_recvd, len); in main()
345 len = read_data(pfd, buf, 1024); in main()
347 if (len != 1) { in main()
350 signal_recvd, len, oob); in main()
366 len = 0; in main()
368 while (len < 70) in main()
369 len = recv(pfd, buf, 1024, MSG_PEEK); in main()
370 len = read_data(pfd, buf, 1024); in main()
372 if (len != 127 || atmark != 1 || !signal_recvd) { in main()
374 len, atmark); in main()
378 len = read_data(pfd, buf, 1024); in main()
380 if (len != 1 || buf[0] != '#' || atmark == 1) { in main()
382 len, buf[0], atmark); in main()
398 len = 0; in main()
400 while (len < 126) in main()
401 len = recv(pfd, buf, 1024, MSG_PEEK); in main()
402 len = read_data(pfd, buf, 1024); in main()
404 if (!signal_recvd || len != 127 || !atmark) { in main()
407 signal_recvd, len, buf[0]); in main()
411 len = read_data(pfd, buf, 1024); in main()
413 if (len != 65 || buf[0] != '%' || atmark != 0) { in main()
416 len, buf[0], atmark); in main()
430 len = read_data(pfd, buf, 1024); in main()
431 if (!signal_recvd || len != 1 || buf[0] != '@') { in main()
434 signal_recvd, len, buf[0]); in main()