mirror of
https://github.com/curl/curl.git
synced 2024-12-27 06:59:43 +08:00
sendf: Curl_client_write(), make passed in buf const
This commit is contained in:
parent
e26c362544
commit
5b41fac587
@ -14,7 +14,7 @@ With this naming established, client writers are concerned with writing response
|
|||||||
All code in `libcurl` that handles response data is ultimately expected to forward this data via `Curl_client_write()` to the application. The exact prototype of this function is:
|
All code in `libcurl` that handles response data is ultimately expected to forward this data via `Curl_client_write()` to the application. The exact prototype of this function is:
|
||||||
|
|
||||||
```
|
```
|
||||||
CURLcode Curl_client_write(struct Curl_easy *data, int type, char *buf, size_t blen);
|
CURLcode Curl_client_write(struct Curl_easy *data, int type, const char *buf, size_t blen);
|
||||||
```
|
```
|
||||||
The `type` argument specifies what the bytes in `buf` actually are. The following bits are defined:
|
The `type` argument specifies what the bytes in `buf` actually are. The following bits are defined:
|
||||||
|
|
||||||
|
@ -296,7 +296,7 @@ static CURLcode chop_write(struct Curl_easy *data,
|
|||||||
The defines are in sendf.h of course.
|
The defines are in sendf.h of course.
|
||||||
*/
|
*/
|
||||||
CURLcode Curl_client_write(struct Curl_easy *data,
|
CURLcode Curl_client_write(struct Curl_easy *data,
|
||||||
int type, char *buf, size_t blen)
|
int type, const char *buf, size_t blen)
|
||||||
{
|
{
|
||||||
CURLcode result;
|
CURLcode result;
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@
|
|||||||
* Write `len` bytes at `prt` to the client. `type` indicates what
|
* Write `len` bytes at `prt` to the client. `type` indicates what
|
||||||
* kind of data is being written.
|
* kind of data is being written.
|
||||||
*/
|
*/
|
||||||
CURLcode Curl_client_write(struct Curl_easy *data, int type, char *ptr,
|
CURLcode Curl_client_write(struct Curl_easy *data, int type, const char *ptr,
|
||||||
size_t len) WARN_UNUSED_RESULT;
|
size_t len) WARN_UNUSED_RESULT;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user