aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2024-10-13 08:38:11 -0700
committerGarrett D'Amore <garrett@damore.org>2024-10-13 08:38:11 -0700
commit0bef8c0aa19042d618f9953f643b9150a5ae0ea5 (patch)
tree54d3011bef9a947f83a3f7cf97410696db3bacc6 /include
parent6d0143d66feec9f9f8418a8758807c503eea87e1 (diff)
downloadnng-0bef8c0aa19042d618f9953f643b9150a5ae0ea5.tar.gz
nng-0bef8c0aa19042d618f9953f643b9150a5ae0ea5.tar.bz2
nng-0bef8c0aa19042d618f9953f643b9150a5ae0ea5.zip
UDP: numerous fixes, added test for copy break
There were several bugs here, including use-after-free, a problem when the copy limit was exceeded, and uninitialized receive thresholds.
Diffstat (limited to 'include')
-rw-r--r--include/nng/nng.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/nng/nng.h b/include/nng/nng.h
index 1b3eae20..f41afb8e 100644
--- a/include/nng/nng.h
+++ b/include/nng/nng.h
@@ -818,9 +818,18 @@ NNG_DECL nng_listener nng_pipe_listener(nng_pipe);
// low order 16 bits will be set. This is provided in native byte order,
// which makes it more convenient than using the NNG_OPT_LOCADDR option.
#define NNG_OPT_TCP_BOUND_PORT "tcp-bound-port"
+
+// UDP options.
+
// UDP alias for convenience uses the same value
#define NNG_OPT_UDP_BOUND_PORT NNG_OPT_TCP_BOUND_PORT
+// UDP short message size. Messages smaller than (or equal to) this
+// will be copied, instead of loan up. This can allow for a faster
+// pass up as we can allocate smaller message buffers instead of having
+// to replace a full message buffer.
+#define NNG_OPT_UDP_COPY_MAX "udp:copy-max"
+
// IPC options. These will largely vary depending on the platform,
// as POSIX systems have very different options than Windows.