Sortix cross-volatile manual
This manual documents Sortix cross-volatile. You can instead view this document in the latest official manual.
curl_ws_recv(3) | Library Functions Manual | curl_ws_recv(3) |
NAME
curl_ws_recv - receive WebSocket dataSYNOPSIS
#include <curl/curl.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.PROTOCOLS
This functionality affects ws onlyEXAMPLE
int main(void)
{
size_t rlen;
const struct curl_ws_frame *meta;
char buffer[256];
CURL *curl = curl_easy_init();
if(curl) {
CURLcode res = curl_ws_recv(curl, buffer, sizeof(buffer), &rlen, &meta);
if(res)
printf("error: %s\n", curl_easy_strerror(res));
}
}
AVAILABILITY
Added in curl 7.86.0RETURN 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.SEE ALSO
curl_easy_getinfo(3), curl_easy_perform(3), curl_easy_setopt(3), curl_ws_send(3), libcurl-ws(3)2024-11-23 | libcurl |