mirror of
https://github.com/curl/curl.git
synced 2025-03-13 15:37:04 +08:00
curl_ws_send.3: call the argument 'fragsize'
Since WebSocket works with "fragments" not "frames" Closes #9668
This commit is contained in:
parent
00452e6aaf
commit
642404717c
@ -30,7 +30,7 @@ curl_ws_send - send WebSocket data
|
|||||||
#include <curl/easy.h>
|
#include <curl/easy.h>
|
||||||
|
|
||||||
CURLcode curl_ws_send(CURL *curl, const void *buffer, size_t buflen,
|
CURLcode curl_ws_send(CURL *curl, const void *buffer, size_t buflen,
|
||||||
size_t *sent, curl_off_t framesize,
|
size_t *sent, curl_off_t fragsize,
|
||||||
unsigned int flags);
|
unsigned int flags);
|
||||||
.fi
|
.fi
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
@ -43,11 +43,11 @@ number of payload bytes in that memory area.
|
|||||||
\fIsent\fP is returned as the number of payload bytes actually sent.
|
\fIsent\fP is returned as the number of payload bytes actually sent.
|
||||||
|
|
||||||
To send a (huge) fragment using multiple calls with partial content per
|
To send a (huge) fragment using multiple calls with partial content per
|
||||||
invoke, set the \fICURLWS_OFFSET\fP bit and the \fIframesize\fP argument as
|
invoke, set the \fICURLWS_OFFSET\fP bit and the \fIfragsize\fP argument as the
|
||||||
the total expected size for the first part, then set the \fICURLWS_OFFSET\fP
|
total expected size for the first part, then set the \fICURLWS_OFFSET\fP with
|
||||||
with a zero \fItotalsize\fP for the following parts.
|
a zero \fIfragsize\fP for the following parts.
|
||||||
|
|
||||||
If not sending a partial fragment or if this is raw mode, \fIframsize\fP
|
If not sending a partial fragment or if this is raw mode, \fIfragsize\fP
|
||||||
should be set to zero.
|
should be set to zero.
|
||||||
|
|
||||||
If \fBCURLWS_RAW_MODE\fP is enabled in \fICURLOPT_WS_OPTIONS(3)\fP, the
|
If \fBCURLWS_RAW_MODE\fP is enabled in \fICURLOPT_WS_OPTIONS(3)\fP, the
|
||||||
@ -73,8 +73,8 @@ This as a pong.
|
|||||||
.IP CURLWS_OFFSET
|
.IP CURLWS_OFFSET
|
||||||
The provided data is only a partial fragment and there will be more in a
|
The provided data is only a partial fragment and there will be more in a
|
||||||
following call to \fIcurl_ws_send()\fP. When sending only a piece of the
|
following call to \fIcurl_ws_send()\fP. When sending only a piece of the
|
||||||
fragment like this, the \fIframesize\fP must be provided with the total
|
fragment like this, the \fIfragsize\fP must be provided with the total
|
||||||
expected frame size in the first call and it needs to be zero in subsequent
|
expected fragment size in the first call and it needs to be zero in subsequent
|
||||||
calls.
|
calls.
|
||||||
.SH EXAMPLE
|
.SH EXAMPLE
|
||||||
.nf
|
.nf
|
||||||
|
Loading…
x
Reference in New Issue
Block a user