• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// -*- mode:doc; -*-
2// vim: set syntax=asciidoc tw=0
3
4coap_websockets(3)
5==================
6:doctype: manpage
7:man source:   coap_websockets
8:man version:  @PACKAGE_VERSION@
9:man manual:   libcoap Manual
10
11NAME
12----
13coap_websockets,
14coap_ws_is_supported,
15coap_wss_is_supported,
16coap_ws_set_host_request
17- Work with CoAP WebSockets
18
19SYNOPSIS
20--------
21*#include <coap@LIBCOAP_API_VERSION@/coap.h>*
22
23*int coap_ws_is_supported(void);*
24
25*int coap_wss_is_supported(void);*
26
27*int coap_ws_set_host_request(coap_session_t *_session_,
28coap_str_const_t *_ws_host_);*
29
30DESCRIPTION
31-----------
32This man page describes the additional libcoap functions that are available
33for working with the optional WebSockets support.
34
35CoAP Servers can be set up to listen for incoming WebSockets requests, and
36CoAP Clients can initiate WebSockets requests using the CoAP schemes coap_ws://
37and coaps+ws://.
38
39FUNCTIONS
40---------
41
42*Function: coap_ws_is_supported()*
43
44The *coap_ws_is_supported*() function is used to determine whether WebSockets
45support is available in libcoap.
46
47*Function: coap_wss_is_supported()*
48
49The *coap_wss_is_supported*() function is used to determine whether Secure
50WebSockets support is available in libcoap.
51
52*Function: coap_ws_set_host_request()*
53
54The *coap_ws_set_host_request*() function is used to set _ws_host_ as the HTTP
55Host: for the _session_ in a WebSockets request.
56
57RETURN VALUES
58-------------
59*coap_ws_is_supported*() returns 0 if there is no support, 1 if support is
60available.
61
62*coap_wss_is_supported*() returns 0 if there is no support, 1 if support is
63available.
64
65*coap_ws_set_host_request*() returns 1 if successful, else 0 if a failure.
66
67SEE ALSO
68--------
69*coap_uri*(3)
70
71FURTHER INFORMATION
72-------------------
73See
74
75"https://rfc-editor.org/rfc/rfc7252[RFC7252: The Constrained Application Protocol (CoAP)]"
76
77"https://rfc-editor.org/rfc/rfc8323[RFC8323: CoAP (Constrained Application Protocol) over TCP, TLS, and WebSockets]"
78
79for further information.
80
81BUGS
82----
83Please report bugs on the mailing list for libcoap:
84libcoap-developers@lists.sourceforge.net or raise an issue on GitHub at
85https://github.com/obgm/libcoap/issues
86
87AUTHORS
88-------
89The libcoap project <libcoap-developers@lists.sourceforge.net>
90