Home
last modified time | relevance | path

Searched refs:buffer (Results 1 – 25 of 173) sorted by relevance

1234567

/curl/tests/unit/
H A Dunit1661.c52 char *buffer = NULL; variable
71 buffer = malloc(13);
72 abort_unless(buffer, "Out of memory");
73 Curl_bufref_set(&bufref, buffer, 13, test_free);
75 fail_unless((char *) bufref.ptr == buffer, "Referenced data badly set");
83 fail_unless((char *) Curl_bufref_ptr(&bufref) == buffer,
99 fail_unless((char *) bufref.ptr != buffer, "Returned pointer not set");
100 buffer = (char *) Curl_bufref_ptr(&bufref);
101 fail_unless(buffer, "Allocated pointer is NULL");
103 fail_unless(!buffer[3], "Duplicated data should have been truncated");
[all …]
H A Dunit1650.c159 unsigned char buffer[256]; variable
165 buffer, sizeof(buffer), &size);
174 fprintf(stderr, "DNS encode made: %s\n", hexdump(buffer, size));
177 if(req[i].packet && memcmp(req[i].packet, buffer, size)) {
181 abort_if(req[i].packet && memcmp(req[i].packet, buffer, size),
200 len = sizeof(buffer);
201 ptr = (char *)buffer;
236 if(resp[i].out && strcmp((char *)buffer, resp[i].out)) {
238 resp[i].out, buffer);
280 msnprintf((char *)buffer, sizeof(buffer),
[all …]
H A Dunit1655.c143 unsigned char buffer[128]; variable
144 const size_t buflen = sizeof(buffer);
154 DOHcode ret = doh_req_encode(sunshine1, dnstype, buffer, buflen, &olen1);
161 ret2 = doh_req_encode(dotshine1, dnstype, buffer, buflen, &olen2);
168 ret2 = doh_req_encode(sunshine2, dnstype, buffer, buflen, &olen2);
174 ret = doh_req_encode(sunshine1, dnstype, buffer, olen1 - 1, &olen);
178 ret = doh_req_encode(sunshine1, dnstype, buffer, olen1, &olen);
/curl/src/
H A Dtool_getpass.c62 char *getpass_r(const char *prompt, char *buffer, size_t buflen) in getpass_r() argument
79 buffer[0] = '\0'; in getpass_r()
84 &iosb, 0, 0, buffer, buflen, 0, 0, in getpass_r()
88 buffer[iosb.iosb$w_bcnt] = '\0'; in getpass_r()
92 return buffer; /* we always return success */ in getpass_r()
105 buffer[i] = (char)getch(); in getpass_r()
106 if(buffer[i] == '\r' || buffer[i] == '\n') { in getpass_r()
107 buffer[i] = '\0'; in getpass_r()
111 if(buffer[i] == '\b') in getpass_r()
120 buffer[buflen-1] = '\0'; in getpass_r()
[all …]
/curl/tests/server/
H A Dgetpart.c78 buffer++; in line_length()
80 if(*buffer != '\n') { in line_length()
116 if(!*buffer) { in readline()
117 *buffer = calloc(1, 128); in readline()
118 if(!*buffer) in readline()
140 *buffer = newptr; in readline()
282 char *buffer = NULL; in getpart() local
315 ptr = buffer; in getpart()
320 show(("=> %s", buffer)); in getpart()
467 show(("=> %s", buffer)); in getpart()
[all …]
H A Dmqttd.c147 char buffer[512]; in getconfig() local
149 while(fgets(buffer, sizeof(buffer), fp)) { in getconfig()
524 if(!buffer) { in mqttit()
544 buffer = realloc(buffer, buff_size); in mqttit()
545 if(!buffer) { in mqttit()
569 payload_len = (size_t)(buffer[10] << 8) | buffer[11]; in mqttit()
630 packet_id = (unsigned short)((buffer[0] << 8) | buffer[1]); in mqttit()
633 topic_len = (size_t)(buffer[2] << 8) | buffer[3]; in mqttit()
681 topiclen = (size_t)(buffer[1 + bytes] << 8) | buffer[2 + bytes]; in mqttit()
705 if(buffer) in mqttit()
[all …]
H A Dsocksd.c189 char buffer[512]; in getconfig() local
191 while(fgets(buffer, sizeof(buffer), fp)) { in getconfig()
378 rc = recv(fd, (char *)buffer, sizeof(buffer), 0); in sockit()
385 loghex(buffer, rc); in sockit()
425 rc = recv(fd, (char *)buffer, sizeof(buffer), 0); in sockit()
432 loghex(buffer, rc); in sockit()
484 rc = recv(fd, (char *)buffer, sizeof(buffer), 0); in sockit()
491 loghex(buffer, rc); in sockit()
650 char buffer[512]; in tunnel() local
653 nread = recv(cp->clientfd, buffer, sizeof(buffer), 0); in tunnel()
[all …]
H A Dsockfilt.c360 unsigned char *ptr = buffer; in lograw()
407 if(!read_stdin(buffer, 5)) in read_data_block()
410 buffer[5] = '\0'; in read_data_block()
423 lograw(buffer, *buffer_len); in read_data_block()
917 buffer[0], buffer[1], buffer[2], buffer[3]); in disc_handshake()
931 if(!read_data_block(buffer, sizeof(buffer), &buffer_len)) in disc_handshake()
1092 if(!read_stdin(buffer, 5)) in juggle()
1096 buffer[0], buffer[1], buffer[2], buffer[3]); in juggle()
1107 msnprintf((char *)buffer, sizeof(buffer), "%s/%hu\n", ipv_inuse, port); in juggle()
1122 if(!read_data_block(buffer, sizeof(buffer), &buffer_len)) in juggle()
[all …]
/curl/docs/examples/
H A Dwebsocket.c52 char buffer[256]; in recv_pong() local
53 CURLcode result = curl_ws_recv(curl, buffer, sizeof(buffer), &rlen, &meta); in recv_pong()
59 if(!memcmp(expected_payload, buffer, rlen)) { in recv_pong()
81 char buffer[256]; in recv_any() local
83 return curl_ws_recv(curl, buffer, sizeof(buffer), &rlen, &meta); in recv_any()
/curl/docs/libcurl/opts/
H A DCURLOPT_UPLOAD_BUFFERSIZE.md18 CURLOPT_UPLOAD_BUFFERSIZE - upload buffer size
31 buffer in libcurl. It makes libcurl uses a larger buffer that gets passed to
34 buffer.
39 The upload buffer size is by default 64 kilobytes. The maximum buffer size
40 allowed to be set is 2 megabytes. The minimum buffer size allowed to be set is
43 The upload buffer is allocated on-demand - so if the handle is not used for
44 upload, this buffer is not allocated at all.
65 /* ask libcurl to allocate a larger upload buffer */
H A DCURLOPT_BUFFERSIZE.md19 CURLOPT_BUFFERSIZE - receive buffer size
31 Pass a long specifying your preferred *size* (in bytes) for the receive buffer
34 is a benefit of having a larger buffer for performance.
39 This buffer size is by default *CURL_MAX_WRITE_SIZE* (16kB). The maximum
40 buffer size allowed to be set is *CURL_MAX_READ_SIZE* (10MB). The minimum
41 buffer size allowed to be set is 1024.
48 Starting in libcurl 8.7.0, there is just a single transfer buffer allocated
49 per multi handle. This buffer is used by all easy handles added to a multi
50 handle no matter how many parallel transfers there are. The buffer remains
69 /* ask libcurl to allocate a larger receive buffer */
H A DCURLOPT_ERRORBUFFER.md21 CURLOPT_ERRORBUFFER - error buffer for error messages
33 Pass a char pointer to a buffer that libcurl may use to store human readable
35 return code from curl_easy_perform(3) and related functions. The buffer must
38 You must keep the associated buffer available until libcurl no longer needs
43 Do not rely on the contents of the buffer unless an error code was returned.
44 Since 7.60.0 libcurl initializes the contents of the error buffer to an empty
46 was returned but there was no error detail then the buffer was untouched.
73 /* provide a buffer to store errors in */
76 /* set the error buffer as empty before performing a request */
/curl/CMake/
H A DCurlTests.c86 char buffer[8192]; in main() local
96 rc = gethostbyname_r(address, &h, buffer, 8192, &h_errnop); in main()
100 rc = gethostbyname_r(address, &h, buffer, 8192, &hp, &h_errnop); in main()
315 char buffer[1024]; in main() local
317 check(strerror_r(EACCES, buffer, sizeof(buffer))[0]); in main()
331 char buffer[1024]; in main() local
333 check(strerror_r(EACCES, buffer, sizeof(buffer))); in main()
/curl/lib/vtls/
H A Dschannel_verify.c165 Curl_winapi_strerror(GetLastError(), buffer, sizeof(buffer))); in add_certs_data_to_store()
237 char buffer[STRERROR_LEN]; in add_certs_file_to_store() local
241 Curl_winapi_strerror(GetLastError(), buffer, sizeof(buffer))); in add_certs_file_to_store()
263 Curl_winapi_strerror(GetLastError(), buffer, sizeof(buffer))); in add_certs_file_to_store()
273 Curl_winapi_strerror(GetLastError(), buffer, sizeof(buffer))); in add_certs_file_to_store()
303 Curl_winapi_strerror(GetLastError(), buffer, sizeof(buffer))); in add_certs_file_to_store()
544 Curl_sspi_strerror(sspi_status, buffer, sizeof(buffer))); in Curl_verify_host()
698 Curl_sspi_strerror(sspi_status, buffer, sizeof(buffer))); in Curl_verify_certificate()
733 Curl_winapi_strerror(GetLastError(), buffer, sizeof(buffer))); in Curl_verify_certificate()
781 Curl_winapi_strerror(GetLastError(), buffer, sizeof(buffer))); in Curl_verify_certificate()
[all …]
/curl/tests/libtest/
H A Dlib2304.c45 char buffer[256]; in recv_pong() local
46 CURLcode result = curl_ws_recv(curl, buffer, sizeof(buffer), &rlen, &meta); in recv_pong()
52 if(!memcmp(expected_payload, buffer, rlen)) { in recv_pong()
74 char buffer[256]; in recv_any() local
75 CURLcode result = curl_ws_recv(curl, buffer, sizeof(buffer), &rlen, &meta); in recv_any()
H A Dlib2301.c45 char buffer[256];
47 curl_ws_recv(curl, buffer, sizeof(buffer), &rlen, &rflags);
52 if(!memcmp(expected_payload, buffer, rlen)) {
97 unsigned char *buffer = (unsigned char *)b; in writecb() local
107 fprintf(stderr, "%02x ", (unsigned char)buffer[i]); in writecb()
110 if(buffer[0] == 0x89) { in writecb()
H A Dlib1523.c62 char buffer[CURL_ERROR_SIZE]; in test() local
67 curl_easy_setopt(hnd, CURLOPT_ERRORBUFFER, buffer); in test()
73 fprintf(stderr, "error %d: %s\n", ret, buffer); in test()
77 fprintf(stderr, "error %d: %s\n", ret, buffer); in test()
H A Dlib2305.c43 char buffer[256]; in websocket() local
54 curl_ws_recv(curl, buffer, sizeof(buffer), &nread, &meta); in websocket()
69 fwrite(buffer, 1, nread, save); in websocket()
/curl/lib/
H A Dcurl_trc.c124 char buffer[MAXINFO + 5]; in trc_infof() local
130 buffer[len++] = '.'; in trc_infof()
131 buffer[len++] = '.'; in trc_infof()
132 buffer[len++] = '.'; in trc_infof()
134 buffer[len++] = '\n'; in trc_infof()
135 buffer[len] = '\0'; in trc_infof()
136 Curl_debug(data, CURLINFO_TEXT, buffer, len); in trc_infof()
157 char buffer[MAXINFO + 2]; in Curl_trc_cf_infof() local
169 buffer[len++] = '\n'; in Curl_trc_cf_infof()
170 buffer[len] = '\0'; in Curl_trc_cf_infof()
[all …]
H A Dcurl_get_line.c42 char buffer[128]; in Curl_get_line() local
45 char *b = fgets(buffer, sizeof(buffer), input); in Curl_get_line()
H A Dstrdup.c93 void *buffer = malloc(length); in Curl_memdup() local
94 if(!buffer) in Curl_memdup()
97 memcpy(buffer, src, length); in Curl_memdup()
99 return buffer; in Curl_memdup()
H A Dcurl_multibyte.c137 int curlx_win32_stat(const char *path, struct_stat *buffer) in curlx_win32_stat() argument
144 result = _wstat(path_w, buffer); in curlx_win32_stat()
146 result = _wstati64(path_w, buffer); in curlx_win32_stat()
155 return _stat(path, buffer); in curlx_win32_stat()
157 return _stati64(path, buffer); in curlx_win32_stat()
/curl/docs/libcurl/
H A Dcurl_ws_recv.md27 CURLcode curl_ws_recv(CURL *curl, void *buffer, size_t buflen,
36 **buffer**, but not more than **buflen** bytes. *recv* is set to the
40 *buffer*, libcurl returns a full buffer and the application needs to call this
41 function again to continue draining the buffer.
58 char buffer[256];
61 CURLcode res = curl_ws_recv(curl, buffer, sizeof(buffer), &rlen, &meta);
/curl/docs/cmdline-opts/
H A Dno-buffer.md4 Long: no-buffer
13 - --no-buffer $URL
16 # `--no-buffer`
23 Note that this is the negated option name documented. You can use --buffer to
/curl/include/curl/
H A Dmprintf.h60 CURL_EXTERN int curl_msprintf(char *buffer, const char *format, ...)
62 CURL_EXTERN int curl_msnprintf(char *buffer, size_t maxlength,
69 CURL_EXTERN int curl_mvsprintf(char *buffer, const char *format, va_list args)
71 CURL_EXTERN int curl_mvsnprintf(char *buffer, size_t maxlength,

Completed in 39 milliseconds

1234567