mirror of
https://github.com/curl/curl.git
synced 2026-05-01 13:27:52 +03:00
curl_ws_*.3: enhance
- all: SEE ALSO the libcurl-ws man page - send: add example and return value information - meta: mention that the returned data is read-only Closes #11318
This commit is contained in:
parent
f15ded73c8
commit
7bee2ef6ca
3 changed files with 16 additions and 8 deletions
|
|
@ -109,11 +109,10 @@ static size_t writecb(unsigned char *buffer,
|
|||
.SH AVAILABILITY
|
||||
Added in 7.86.0.
|
||||
.SH RETURN VALUE
|
||||
This function returns a pointer to a \fIcurl_ws_frame\fP struct with
|
||||
This function returns a pointer to a \fIcurl_ws_frame\fP struct with read-only
|
||||
information that is valid for this specific callback invocation. If it cannot
|
||||
return this information, or if the function is called in the wrong context, it
|
||||
returns NULL.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_setopt "(3), "
|
||||
.BR curl_easy_getinfo "(3), "
|
||||
.BR curl_ws_send "(3), " curl_ws_recv "(3), "
|
||||
.BR curl_easy_setopt "(3), " curl_easy_getinfo "(3), "
|
||||
.BR curl_ws_send "(3), " curl_ws_recv "(3), " libcurl-ws "(3), "
|
||||
|
|
|
|||
|
|
@ -66,4 +66,4 @@ this function again.
|
|||
.SH "SEE ALSO"
|
||||
.BR curl_easy_setopt "(3), " curl_easy_perform "(3), "
|
||||
.BR curl_easy_getinfo "(3), "
|
||||
.BR curl_ws_send "(3) "
|
||||
.BR curl_ws_send "(3), " libcurl-ws "(3), "
|
||||
|
|
|
|||
|
|
@ -80,13 +80,22 @@ expected fragment size in the first call and it needs to be zero in subsequent
|
|||
calls.
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
|
||||
int ping(CURL *curl, const char *send_payload)
|
||||
{
|
||||
size_t sent;
|
||||
CURLcode result =
|
||||
curl_ws_send(curl, send_payload, strlen(send_payload), &sent, 0,
|
||||
CURLWS_PING);
|
||||
return (int)result;
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.86.0.
|
||||
.SH RETURN VALUE
|
||||
|
||||
\fICURLE_OK\fP (zero) means that the data was sent properly, non-zero means an
|
||||
error occurred as \fI<curl/curl.h>\fP defines. See the \fIlibcurl-errors(3)\fP
|
||||
man page for the full list with descriptions.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_setopt "(3), " curl_easy_perform "(3), "
|
||||
.BR curl_easy_getinfo "(3), "
|
||||
.BR curl_ws_recv "(3) "
|
||||
.BR curl_ws_recv "(3), " libcurl-ws "(3), "
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue