/curl/tests/libtest/ |
H A D | lib556.c | 70 size_t nwritten = 0, nread = 0; in test() local 86 res = curl_easy_recv(curl, buf, sizeof(buf), &nread); in test() 88 if(nread) { in test() 90 if(!write(STDOUT_FILENO, buf, nread)) in test() 94 } while((res == CURLE_OK && nread) || (res == CURLE_AGAIN)); in test()
|
H A D | lib2305.c | 45 size_t nread; in websocket() local 54 curl_ws_recv(curl, buffer, sizeof(buffer), &nread, &meta); in websocket() 67 nread, meta->age, meta->flags, meta->offset, meta->bytesleft); in websocket() 69 fwrite(buffer, 1, nread, save); in websocket()
|
/curl/tests/http/clients/ |
H A D | ws-data.c | 110 size_t r_offset, nread; in recv_binary() local 127 (long)r_offset, (long)sizeof(recvbuf), result, (long)nread); in recv_binary() 133 (long)nread, frame->flags); in recv_binary() 141 if(frame->bytesleft != (curl_off_t)(exp_len - r_offset - nread)) { in recv_binary() 146 if(r_offset + nread > exp_len) { in recv_binary() 148 (long)exp_len, (long)(r_offset + nread)); in recv_binary() 151 if(memcmp(exp_data + r_offset, recvbuf, nread)) { in recv_binary() 153 (long)r_offset, (long)nread); in recv_binary() 154 dump("expected:", (unsigned char *)exp_data + r_offset, nread, 0); in recv_binary() 155 dump("received:", (unsigned char *)recvbuf, nread, 0); in recv_binary() [all …]
|
/curl/docs/examples/ |
H A D | anyauthput.c | 72 size_t nread; in read_callback() local 74 nread = fread(ptr, size, nmemb, stream); in read_callback() 76 if(nread > 0) { in read_callback() 77 fprintf(stderr, "*** We read %lu bytes from file\n", (unsigned long)nread); in read_callback() 80 return nread; in read_callback()
|
H A D | sendrecv.c | 149 size_t nread; in main() local 151 nread = 0; in main() 152 res = curl_easy_recv(curl, buf, sizeof(buf), &nread); in main() 165 if(nread == 0) { in main() 170 printf("Received %lu bytes.\n", (unsigned long)nread); in main()
|
H A D | httpput.c | 46 unsigned long nread; in read_callback() local 54 nread = (unsigned long)retcode; in read_callback() 55 fprintf(stderr, "*** We read %lu bytes from file\n", nread); in read_callback()
|
H A D | ftpupload.c | 55 unsigned long nread; in read_callback() local 62 nread = (unsigned long)retcode; in read_callback() 63 fprintf(stderr, "*** We read %lu bytes from file\n", nread); in read_callback()
|
/curl/lib/ |
H A D | http1.c | 106 ssize_t nread = 0; in next_line() local 115 if(nread >= 0) { in next_line() 131 nread = (*err) ? -1 : (ssize_t)buflen; in next_line() 133 return nread; in next_line() 266 ssize_t nread = 0, n; in Curl_h1_req_parse_read() local 273 nread = -1; in Curl_h1_req_parse_read() 280 nread += (size_t)n; in Curl_h1_req_parse_read() 292 nread = -1; in Curl_h1_req_parse_read() 300 nread = -1; in Curl_h1_req_parse_read() 311 nread = -1; in Curl_h1_req_parse_read() [all …]
|
H A D | file.c | 357 size_t nread; in file_upload() local 368 nread = readcount; in file_upload() 373 data->state.resume_from -= nread; in file_upload() 374 nread = 0; in file_upload() 387 nwrite = write(fd, sendbuf, nread); in file_upload() 388 if((size_t)nwrite != nread) { in file_upload() 393 bytecount += nread; in file_upload() 571 ssize_t nread; in file_do() local 584 if(nread > 0) in file_do() 585 xfer_buf[nread] = 0; in file_do() [all …]
|
H A D | bufq.c | 117 ssize_t nread; in chunk_slurpn() local 127 if(nread > 0) { in chunk_slurpn() 131 return nread; in chunk_slurpn() 510 nread += n; in Curl_bufq_read() 516 if(nread == 0) { in Curl_bufq_read() 520 return nread; in Curl_bufq_read() 670 ssize_t nread; in Curl_bufq_sipn() local 685 if(nread < 0) { in Curl_bufq_sipn() 692 return nread; in Curl_bufq_sipn() 717 nread = -1; in bufq_slurpn() [all …]
|
H A D | krb5.c | 198 ssize_t nread; in krb5_auth() local 447 ssize_t nread = 0; in ftp_send_command() local 474 ssize_t nread = 0; in socket_read() local 478 if(nread > 0) { in socket_read() 479 len -= nread; in socket_read() 480 to_p += nread; in socket_read() 524 int nread; in read_data() local 549 len -= nread; in read_data() 555 if(nread < 0) in read_data() 585 ssize_t nread; in sec_recv() local [all …]
|
H A D | socketpair.c | 210 ssize_t nread; in Curl_socketpair() local 217 nread = sread(socks[1], p, s); in Curl_socketpair() 218 if(nread == -1) { in Curl_socketpair() 239 s -= nread; in Curl_socketpair() 241 p += nread; in Curl_socketpair()
|
H A D | cf-h2-proxy.c | 241 ssize_t nread; in proxy_nw_in_reader() local 250 nread = 0; in proxy_nw_in_reader() 252 return nread; in proxy_nw_in_reader() 482 ssize_t nread; in proxy_h2_progress_ingress() local 820 ssize_t nread; in tunnel_send_callback() local 835 if(nread < 0) { in tunnel_send_callback() 845 return nread; in tunnel_send_callback() 1341 nread = -1; in tunnel_recv() 1347 return nread; in tunnel_recv() 1382 nread = -1; in cf_h2_proxy_recv() [all …]
|
H A D | sendf.c | 530 *nread = 0; in Curl_creader_read() 561 *nread = 0; in Curl_creader_def_read() 655 size_t nread; in cr_in_read() local 678 nread = 0; in cr_in_read() 686 switch(nread) { in cr_in_read() 736 *pnread = nread; in cr_in_read() 1000 if(!nread || !memchr(buf, '\n', nread)) { in cr_lc_read() 1186 DEBUGASSERT(nread); in Curl_client_read() 1288 if(nread > blen) in cr_buf_read() 1289 nread = blen; in cr_buf_read() [all …]
|
H A D | telnet.c | 1238 DEBUGASSERT(nread > 0); in send_telnet_data() 1239 if(nread < 0) in send_telnet_data() 1257 outlen = (size_t)nread; in send_telnet_data() 1319 ssize_t nread; in telnet_do() local 1477 else if(nread <= 0) { in telnet_do() 1570 else if(nread <= 0) { in telnet_do() 1575 total_dl += nread; in telnet_do() 1593 nread = 0; in telnet_do() 1611 if(nread > 0) { in telnet_do() 1617 total_ul += nread; in telnet_do() [all …]
|
H A D | mqtt.c | 367 ssize_t nread; in mqtt_recv_atleast() local 373 DEBUGASSERT(nread >= 0); in mqtt_recv_atleast() 374 if(Curl_dyn_addn(&mq->recvbuf, readbuf, (size_t)nread)) in mqtt_recv_atleast() 625 ssize_t nread; in mqtt_read_publish() local 681 result = Curl_xfer_recv(data, buffer, rest, &nread); in mqtt_read_publish() 688 if(!nread) { in mqtt_read_publish() 699 mq->npacket -= nread; in mqtt_read_publish() 745 ssize_t nread; in mqtt_doing() local 766 else if(!nread) { in mqtt_doing() 780 if(result || !nread) in mqtt_doing() [all …]
|
H A D | curl_rtmp.c | 314 ssize_t nread; in rtmp_recv() local 318 nread = RTMP_Read(r, buf, curlx_uztosi(len)); in rtmp_recv() 319 if(nread < 0) { in rtmp_recv() 323 nread = 0; in rtmp_recv() 328 return nread; in rtmp_recv()
|
H A D | socks.c | 107 ssize_t nread = 0; in Curl_blockread_all() local 127 if(nread <= 0) { in Curl_blockread_all() 137 allread += nread; in Curl_blockread_all() 142 if(!nread) { in Curl_blockread_all() 147 buffersize -= nread; in Curl_blockread_all() 148 buf += nread; in Curl_blockread_all() 149 allread += nread; in Curl_blockread_all() 247 ssize_t nread; in socks_state_recv() local 252 if(nread <= 0) { in socks_state_recv() 267 sx->outstanding -= nread; in socks_state_recv() [all …]
|
/curl/tests/unit/ |
H A D | unit2603.c | 76 ssize_t nread; in parse_success() local 84 nread = Curl_h1_req_parse_read(&p, buf, buflen, t->default_scheme, in parse_success() 86 if(nread < 0) { in parse_success() 90 in_consumed += (size_t)nread; in parse_success() 91 if((size_t)nread != buflen) { in parse_success() 94 nread, buflen, buf); in parse_success()
|
H A D | unit2601.c | 100 size_t nwritten, nread; in check_bufq() local 143 nread = 0; in check_bufq() 147 nread += (size_t)n; in check_bufq() 154 if(nread != max_len) { in check_bufq() 201 nread = 0; in check_bufq() 208 nread += (size_t)n; in check_bufq() 210 fail_unless(nread == nwritten, "did not get the same out as put in"); in check_bufq()
|
/curl/src/ |
H A D | tool_getpass.c | 179 ssize_t nread; in getpass_r() local 188 nread = read(fd, password, buflen); in getpass_r() 189 if(nread > 0) in getpass_r() 190 password[--nread] = '\0'; /* null-terminate where enter is stored */ in getpass_r()
|
H A D | tool_paramhlp.c | 101 size_t nread = fread(buffer, 1, sizeof(buffer), file); in file2string() local 108 while(nread) { in file2string() 109 size_t nlen = memcrlf(ptr, FALSE, nread); in file2string() 112 nread -= nlen; in file2string() 114 if(nread) { in file2string() 116 nlen = memcrlf(ptr, TRUE, nread); in file2string() 118 nread -= nlen; in file2string() 130 size_t nread; in file2memory() local 136 nread = fread(buffer, 1, sizeof(buffer), file); in file2memory() 143 if(nread) in file2memory() [all …]
|
/curl/lib/vquic/ |
H A D | curl_quiche.c | 418 ssize_t nread; in stream_resp_read() local 429 return nread; in stream_resp_read() 620 ssize_t nread; in recv_pkt() local 731 ssize_t nread; in cf_flush_egress() local 837 nread = 0; in recv_closed_stream() 839 return nread; in recv_closed_stream() 869 nread = -1; in cf_quiche_recv() 899 nread = -1; in cf_quiche_recv() 907 nread = -1; in cf_quiche_recv() 909 if(nread > 0) in cf_quiche_recv() [all …]
|
H A D | vquic.c | 470 ssize_t nread; in recvmsg_packets() local 494 if(nread == -1) { in recvmsg_packets() 508 nread, SOCKERRNO, errstr); in recvmsg_packets() 513 total_nread += (size_t)nread; in recvmsg_packets() 517 gso_size = (size_t)nread; in recvmsg_packets() 524 if(to > (size_t)nread) { in recvmsg_packets() 525 pktlen = (size_t)nread - offset; in recvmsg_packets() 557 ssize_t nread; in recvfrom_packets() local 568 if(nread == -1) { in recvfrom_packets() 583 nread, SOCKERRNO, errstr); in recvfrom_packets() [all …]
|
/curl/lib/vtls/ |
H A D | rustls.c | 99 if(nread < 0) { in read_cb() 100 nread = 0; in read_cb() 106 else if(nread == 0) in read_cb() 202 ssize_t nread; in cr_recv() local 230 nread = -1; in cr_recv() 240 nread = -1; in cr_recv() 261 nread = 0; in cr_recv() 265 nread = -1; in cr_recv() 271 return nread; in cr_recv() 1011 if(nread <= 0) in cr_shutdown() [all …]
|