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

NAME

6       coap_init, coap_startup, coap_cleanup - Work with CoAP initialization
7

SYNOPSIS

9       #include <coap3/coap.h>
10
11       void coap_startup(void);
12
13       void coap_cleanup(void);
14
15       For specific (D)TLS library support, link with -lcoap-3-notls,
16       -lcoap-3-gnutls, -lcoap-3-openssl, -lcoap-3-mbedtls or
17       -lcoap-3-tinydtls. Otherwise, link with -lcoap-3 to get the default
18       (D)TLS library support.
19

DESCRIPTION

21       The CoAP libcoap logic needs to be initialized before there is any use
22       of the libcoap public API. This is done by calling coap_startup().
23

FUNCTIONS

25       Function: coap_startup()
26
27       The coap_startup() function must be called before any other coap_*()
28       functions are called. It is used to initialize things like mutexes,
29       random number gererators, clocks, TLS libraries etc.
30
31       NOTE: This should be called after any other lower layer is initialized.
32       For example, for LwIP, lwip_init() must be called before
33       coap_startup().
34
35       NOTE: After the inital call to coap_startup(), subsequent calls are
36       ignored until coap_cleanup() is called.
37
38       Function: coap_cleanup()
39
40       The coap_cleanup() function is used to cleanup / free any information
41       set up by the coap_startup() function and should be the last coap_*()
42       function called. It is possible to call coap_startup() after
43       coap_cleanup() to re-initialize the libcoap logic.
44
45       NOTE: All other libcoap cleanups should called prior to coap_cleanup(),
46       e.g. coap_free_context(3).
47

FURTHER INFORMATION

49       See
50
51       "RFC7252: The Constrained Application Protocol (CoAP)"
52
53       for further information.
54

BUGS

56       Please report bugs on the mailing list for libcoap:
57       libcoap-developers@lists.sourceforge.net or raise an issue on GitHub at
58       https://github.com/obgm/libcoap/issues
59

AUTHORS

61       The libcoap project <libcoap-developers@lists.sourceforge.net>
62
63
64
65coap_init 4.3.4                   10/09/2023                      COAP_INIT(3)
Impressum