aboutsummaryrefslogtreecommitdiff
path: root/src/core/platform.h
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2025-04-27 18:40:40 -0700
committerGarrett D'Amore <garrett@damore.org>2025-06-01 22:49:00 -0700
commit8bcb82d245a5fce1bd519e2f99250dedf11e763d (patch)
tree4d663bedbb043b9d599f061d7f2b5f9509c8f390 /src/core/platform.h
parent08400bd437149c4fb31af9b2abece2ae44041283 (diff)
downloadnng-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 'src/core/platform.h')
-rw-r--r--src/core/platform.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/platform.h b/src/core/platform.h
index a13ae9f2..cdb0d887 100644
--- a/src/core/platform.h
+++ b/src/core/platform.h
@@ -359,6 +359,10 @@ typedef struct nni_plat_udp nni_plat_udp;
// aio's a_pipe.
extern int nni_plat_udp_open(nni_plat_udp **, const nni_sockaddr *);
+// nni_plat_udp_stop stops I/O on the socket, but does not close it
+// or free the underlying data. May block for callbacks to complete.
+extern void nni_plat_udp_stop(nni_plat_udp *);
+
// nni_plat_udp_close closes the underlying UDP socket.
extern void nni_plat_udp_close(nni_plat_udp *);