1COAP_WEBSOCKETS(3)              libcoap Manual              COAP_WEBSOCKETS(3)
2
3
4

NAME

6       coap_websockets, coap_ws_is_supported, coap_wss_is_supported,
7       coap_ws_set_host_request - Work with CoAP WebSockets
8

SYNOPSIS

10       #include <coap3/coap.h>
11
12       int coap_ws_is_supported(void);
13
14       int coap_wss_is_supported(void);
15
16       int coap_ws_set_host_request(coap_session_t *session, coap_str_const_t
17       *ws_host);
18

DESCRIPTION

20       This man page describes the additional libcoap functions that are
21       available for working with the optional WebSockets support.
22
23       CoAP Servers can be set up to listen for incoming WebSockets requests,
24       and CoAP Clients can initiate WebSockets requests using the CoAP
25       schemes coap_ws:// and coaps+ws://.
26

FUNCTIONS

28       Function: coap_ws_is_supported()
29
30       The coap_ws_is_supported() function is used to determine whether
31       WebSockets support is available in libcoap.
32
33       Function: coap_wss_is_supported()
34
35       The coap_wss_is_supported() function is used to determine whether
36       Secure WebSockets support is available in libcoap.
37
38       Function: coap_ws_set_host_request()
39
40       The coap_ws_set_host_request() function is used to set ws_host as the
41       HTTP Host: for the session in a WebSockets request.
42

RETURN VALUES

44       coap_ws_is_supported() returns 0 if there is no support, 1 if support
45       is available.
46
47       coap_wss_is_supported() returns 0 if there is no support, 1 if support
48       is available.
49
50       coap_ws_set_host_request() returns 1 if successful, else 0 if a
51       failure.
52

SEE ALSO

54       coap_uri(3)
55

FURTHER INFORMATION

57       See
58
59       "RFC7252: The Constrained Application Protocol (CoAP)"
60
61       "RFC8323: CoAP (Constrained Application Protocol) over TCP, TLS, and
62       WebSockets"
63
64       for further information.
65

BUGS

67       Please report bugs on the mailing list for libcoap:
68       libcoap-developers@lists.sourceforge.net or raise an issue on GitHub at
69       https://github.com/obgm/libcoap/issues
70

AUTHORS

72       The libcoap project <libcoap-developers@lists.sourceforge.net>
73
74
75
76coap_websockets 4.3.4             10/09/2023                COAP_WEBSOCKETS(3)
Impressum