diff options
| author | Garrett D'Amore <garrett@damore.org> | 2025-04-27 18:40:40 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2025-06-01 22:49:00 -0700 |
| commit | 8bcb82d245a5fce1bd519e2f99250dedf11e763d (patch) | |
| tree | 4d663bedbb043b9d599f061d7f2b5f9509c8f390 /include | |
| parent | 08400bd437149c4fb31af9b2abece2ae44041283 (diff) | |
| download | nng-8bcb82d245a5fce1bd519e2f99250dedf11e763d.tar.gz nng-8bcb82d245a5fce1bd519e2f99250dedf11e763d.tar.bz2 nng-8bcb82d245a5fce1bd519e2f99250dedf11e763d.zip | |
Introduce DTLS transport for NNG.
This introduces a new experimental transport for DTLS, that
provides encryption over UDP. It has a simpler protocol than
the current UDP SP protocol (but we intend to fix that by making
the UDP transport simpler in a follow up!)
There are a few other fixes in the TLS layer itself, and in
the build, that were needed to accomplish this work.
Also there was an endianness bug in the UDP protocol handling, which
is fixed here.
Diffstat (limited to 'include')
| -rw-r--r-- | include/nng/nng.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/include/nng/nng.h b/include/nng/nng.h index 32605e3c..b3f9e461 100644 --- a/include/nng/nng.h +++ b/include/nng/nng.h @@ -1241,7 +1241,14 @@ typedef struct nng_udp nng_udp; // to the specified address. NNG_DECL int nng_udp_open(nng_udp **udpp, nng_sockaddr *sa); -// nng_udp_close closes the underlying UDP socket. +// nng_udp_stop stops the UDP socket from transferring data, before closing it. +// This may be useful if data flows need to be stopped but freeing the +// structure must be done at a later time. Note that this may wait for I/O to +// be canceled. +NNG_DECL void nng_udp_stop(nng_udp *udp); + +// nng_udp_close closes the underlying UDP socket and frees the associated +// resources. Calls nng_udp_stop implicitly. NNG_DECL void nng_udp_close(nng_udp *udp); // nng_udp_sockname determines the locally bound address. |
