OpenSuSE Man Pages

Man Page or Keyword Search:
Man Architecture
Apropos Keyword Search (all sections) Output format
home | help
x SuSE Linux 13.1-RELEASE x
x SuSE Linux 13.1-RELEASEx
curl_ws_recv(3)                     libcurl                    curl_ws_recv(3)

NAME
       curl_ws_recv - receive WebSocket data

SYNOPSIS
       #include <curl/easy.h>

       CURLcode curl_ws_recv(CURL *curl, void *buffer, size_t buflen,
                             size_t *recv, const struct curl_ws_frame **meta);

DESCRIPTION
       This function call is EXPERIMENTAL.

       Retrieves  as  much  as  possible of a received WebSocket data fragment
       into the buffer, but not more than buflen bytes. recv  is  set  to  the
       number of bytes actually stored.

       If  there  is  more fragment data to deliver than what fits in the pro-
       vided buffer, libcurl returns a full buffer and the  application  needs
       to call this function again to continue draining the buffer.

       The meta pointer gets set to point to a const struct curl_ws_frame that
       contains information about the received data. See  the  curl_ws_meta(3)
       for details on that struct.

EXAMPLE
         size_t rlen;
         const struct curl_ws_frame *meta;
         char buffer[256];
         CURLcode result = curl_ws_recv(curl, buffer, sizeof(buffer), &rlen, &meta);

AVAILABILITY
       Added in 7.86.0.

RETURN VALUE
       Returns  CURLE_OK  if  everything  is  okay,  and a non-zero number for
       errors. Returns  CURLE_GOT_NOTHING  if  the  associated  connection  is
       closed.

       Instead  of  blocking,  the  function  returns CURLE_AGAIN. The correct
       behavior is then to wait for the socket to  signal  readability  before
       calling this function again.

SEE ALSO
       curl_easy_setopt(3),     curl_easy_perform(3),    curl_easy_getinfo(3),
       curl_ws_send(3), libcurl-ws(3)

libcurl 8.4.0                 September 26, 2023               curl_ws_recv(3)

Want to link to this manual page? Use this URL:
<
http://star2.abcm.com/cgi-bin/bsdi-man?query=curl_ws_recv&sektion=3&manpath=>

home | help