COAP_WEBSOCKETS(3)
π COAP_WEBSOCKETS(3) π
okay so bestie, welcome to the libcoap Manual β¨ β this is the page about coap_websockets and coap_ws_set_host_request, aka the Work with CoAP WebSockets era of your life π
πΈ SYNOPSIS πΈ
like, just include the header first, obviously:
#include <coap3/coap.h>
int coap_ws_set_host_request(coap_session_t *session, coap_str_const_t
*ws_host);
that's it, that's the whole vibe π
π DESCRIPTION π
okay so this man page is describing the additional libcoap functions that exist for working with the optional WebSockets support π. optional, bestie β it's giving "you have to opt in" energy, iykyk.
CoAP Servers can be set up to listen for incoming WebSockets requests πβ¨, and CoAP Clients can initiate WebSockets requests using the CoAP schemes coap_ws:// and coaps+ws:// π₯. yes those are real, write them down, no cap.
π¦ FUNCTIONS π¦
Function: coap_ws_set_host_request()
so the coap_ws_set_host_request() function is literally the one that sets ws_host as the HTTP Host: for the session in a WebSockets request π
. that's the whole job. it ate and left no crumbs.
β RETURN VALUES β
coap_ws_set_host_request() returns 1 if successful πβ¨, else 0 if a failure π. binary queen. no in-between.
π«Ά SEE ALSO π«Ά
go read these next, bestie, they're iconic:
π§ FURTHER INFORMATION π§
See π
"RFC7252: The Constrained Application Protocol (CoAP)"
"RFC8323: CoAP (Constrained Application Protocol) over TCP, TLS, and WebSockets"
for further information πβ¨. yes, actual reading. you got this π«Ά
π BUGS π
found something cursed? Please raise an issue on GitHub at https://github.com/obgm/libcoap/issues to report any bugs ππ
and if you've got the fix? Please raise a Pull Request at https://github.com/obgm/libcoap/pulls for any fixes π
π₯. main character energy fr fr.
πΊ AUTHORS πΊ
The libcoap project <libcoap-developers@lists.sourceforge.net> π
and that's the page, bestie π β brought to you by coap_websockets 4.3.5, dated 08/24/2026, signing off with a little sparkle πβ¨πΈ
π¦ where this page comes from
- ubuntu stonking: libcoap3t64 4.3.5-4ubuntu1 Β· BSD-2-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms