Releases: nanomsg/nng
Version 1.9.0 Feature Release
This is probably the last feature release for the 1.x line for NNG.
This fixes quite a few bugs, the main new features here are around TLS support.
- TLS 1.3 is supported for Mbed TLS
- WolfSSL is now supported without an extra module. (You need to honor the licensing terms of WolfSSL itself however.)
- TLS support for PSK (pre-shared keys)
- A new
nng_id_visit
API is available for iterating over all nodes in an ID hash map. - An experimental (undocumented) but exposed "public" API for UDP is available
There are significant fixes for race conditions around close, and use-after-free. Everyone is recommended to update.
More details:
What's Changed
- Move supplemental platform APIs to core. by @gdamore in #1821
- fixes #1808 nng_msg_insert: munmap_chunk(): invalid pointer by @gdamore in #1823
- macOS - fix deadlock on reqrep socket close by @alzix in #1824
- Gdamore/win clock fix by @gdamore in #1834
- fixes #1827 Windows a deadlock on nng_close() by @gdamore in #1828
- Fixes typo that will cause error when comipling zerotier transport. by @PWisPeterWang in #1829
- UDP: Introduce an experimental (undocumented for now) public API for … by @gdamore in #1838
- fix testcase crash on NUTTX When log_buf is null for the first time. by @Meissi-jian in #1844
- fixes #1846 Add support for TLS PSK by @gdamore in #1847
- Merge WolfSSL support into mainstream, and relicense it under MIT. by @gdamore in #1850
- idhash: add nng_id_visit API by @gdamore in #1863
- trial to fix winipc crash by @gdamore in #1848
- TLS: enable TLS 1.3 for Mbed TLS. by @gdamore in #1854
- fixes #1866 clock_gettime is not used on Android, even though available by @gdamore in #1870
New Contributors
- @alzix made their first contribution in #1824
- @PWisPeterWang made their first contribution in #1829
- @Meissi-jian made their first contribution in #1844
Full Changelog: v1.8.0...v1.9.0
Version 1.8.0 Feature Release
New Features
This release introduces two main features.
- A new logging framework should help with debugging.
This framework allows applications to provide their own loggers.
Initially we have added logging for SP connection related events, but more can be added later.
Seenng_log(3)
,nng_log_set_logger(3)
for details. - In support of the above,
nng_str_sockaddr(3)
is added.
This function obtains a representation of the socket address suitable for display (or logging).
Bugs Fixed
- A memory leak associated with a connection lock object for TLS connections is fixed.
This only affects platforms where mutexes are allocated dynamically.
Detailed Changes
- Update nng_ctx.5.adoc by @drbitboy in #1797
- Update protocol.h by @drbitboy in #1798
- fixes #543 Add logging support framework by @gdamore in #1806
- Add header to posix_rand_getrandom.c by @shikokuchuo in #1805
- Add missing
nng_tls_config_hold
stub function by @mlasch in #1803 - Logging enhancements. by @gdamore in #1809
- [tls_common] finish conn lock in tls_reap by @RanMaoyi in #1811
- Log messages when peer sends too large message. by @gdamore in #1812
- Bump golang.org/x/net from 0.19.0 to 0.23.0 in /etc/pubrefman by @dependabot in #1815
- Logging improvements by @gdamore in #1816
New Contributors
- @drbitboy made their first contribution in #1797
- @mlasch made their first contribution in #1803
- @RanMaoyi made their first contribution in #1811
Full Changelog: v1.7.3...v1.8.0
Version 1.7.3 Bug Fix Release
This release fixes a few bugs, including one long-standing issue.
- Fixed deadlock closing socket on Windows (#1543)
- Improved Mbed TLS configuration (#1771)
- New NNG_ENABLE_IPV6 option to disable IPv6 (#1496)
- Fix for test failures when system does not support IPv6 (also #1496)
- Compiler warning fixes
- Langue fixes for socket manual from @shikokuchuo
- Fix for various documentation formatting bugs (going back to asciidoctor for formatting)
Windows users are advised to update. There is no particular urgency for updating for users of other platforms.
Version 1.7.2 bug fix release
This release has some fairly minor fixes and improvements
- New
NNG_ENABLE_COMPAT
(defaults toON
) can be disabled to remove compatibility support for legacy libnanomsg - Better detection and handling of Mbed TLS - especially version 3.0 and later
- Fixed some compilation warnings
None of these are particularly urgent, but if you're using Mbed TLS or prefer to have a clean build, then this might be helpful.
Version 1.7.1 Bug Fix Release
This fixes two problems and includes a new example program.
- Fix the public
id_map
API -- the header was not published, so it wasn't usable. As part of this we've moved the header and also removed the ability to opt out (the changes here are too small to be worth reducing.) The header is now located in<nng/supplemental/util/idhash.h>
. - FIx a warning when compiling nng_socket_pair, due to inconsistent prototypes (
int *
instead ofint [2]
).
The new demo program was contributed by Hugo Lindström hugolm84@gmail.com and demonstrates how to use nng_stream. It won't work on every system, but it should still be informative.
Version 1.7.0 Feature Release
Welcome to 2024! As a New Year's gift to you, we present version 1.7.0 of NNG.
This release contains the following notable changes:
-
A new compile time setting,
NNG_MAX_POLLER_THREADS
is introduced, with a default value of 8, and will limit the number of threads
used for pollers that are concurrent (currently only Windows). Additionally, for single core systems only two threads will be started instead of four. -
A new supplemental API, nng_id_map(3), is made available. This exposes the internal ID hash API NNG uses mapping integer IDs
(like socket IDs) to data structures. It also brings back support for 64-bit IDs. See bug #1740. -
Setting the
NNG_OPT_RECVMAXSZ
setting no longer affects pipes that are already established. The old behavior was undocumented
and racy. Please set this setting before starting any listeners or dialers. -
A new transport (experimental), for
socket://
is available. This allows a connection using sockets created withsocketpair()
(or the newnng_socket_pair()
supplemental API), which can help use cases where file descriptors are passed between processes or inherited viafork()
. This API is only available on Linux. It does have somewhat different semantics for establishing the connection, so please see the manual page fornng_socket(5)
for more information. -
WebSocket close is fixed to conform to RFC 6455, sending the close frame, and waiting to receive the close frame from the peer. This allows websocket based connections to ensure that data messages are fully delivered before shutting down. See bugs #1733, #1734 and #1735. Thanks @alawn-wang for the inspiration and a first draft of the change.
-
The REQ and SURVEYOR protocols were fixed to improve scalability when many clients or many contexts are used. As part of this change, a new option,
NNG_OPT_REQ_RESENDTICK
is available to adjust how often we check for expired requests. See bug #1663. -
A new ability to override compile-time settings for thread counts is available. This facility is considered experimental, and is not documented in manual pages -- and is subject to change without notice. Please see nng_init_set_parameter() in the nng.h header file. The values that can be tuned are listed there along with comments describing their use. See bug #1572.
-
As part of the fixes for #1572, tunable values for setting fixed values (rather upper limits) for thread counts are now exposed properly via CMake variables. These are
NNG_NUM_EXPIRE_THREADS
andNNG_NUM_TASKQ_THREADS
. -
A new API,
nng_aio_set_expire()
is introduced as a complement tonng_aio_set_timeout()
. This provides absolute expiration times, which may be easier in circumstances involving multiple actions such as common state-machine based idioms. -
A bug which caused TLS connections to spin on accept, causing high CPU usage, is fixed. See bug #1673.
-
The separate thread created for the timer is removed. See bug #1729.
-
Various minor documentation fixes were made, some contributed by Patrik Wenger patrik.wenger@mindclue.ch.
Version 1.6.0 Feature Release
After a very long time indeed (over 2 years!), we are happy to announce v1.6.0 of NNG!
-
Numerous critical bugs were fixed; some of these led to seg faults, crashes, and
memory leaks. See bugs #1523, #1713, #1702, #1657, #1347, #1518, #1526, #1541, #1638, #1543, #1657, #1658 -
Significant performance optimizations have been made, especially to the BUS protocol, the
nng_sendmsg()
andnng_recvmsg()
functions, when connecting and disconnecting lots of pipes,
and when using very different expiration times with vast numbers of requests. -
New APIs were added for
nng_aio_busy()
,nng_ctx_sendmsg()
,nng_ctx_recvmsg()
,nng_device_aio()
. -
A CMake tunable for limiting the number of threads use for request expiration is provided
via theNNG_MAX_EXPIRE_THREADS
option. -
Additionally various fixes for compilation problems, documentation errata, test case, and so forth
have been applied.
Version 1.5.2 Bug Fix Release
This release addresses a number of issues with 1.5.1 and 1.5.0, and users of those versions are encouraged to upgrade.
- MbedTLS 3.0 is now supported
- Several bugs in the aio subsystem leading to hangs or performance issues are addressed
- Possible crash due to mismatched nni_strdup/free usage fixed
- Fix for building on iOS, tvOS, iPadOS, watchOS
- Incorrect version number macros in CMake configuration fixed
- Several other minor cleanups (remove dead code, simplify some things)
Version 1.5.1 Bug Fix Release
This release just addresses problems with the version label and cmake version properties.
Version 1.5.0 Feature Release
This release provides a two new convenience APIs, nng_msg_reserve() and nng_msg_capacity(), which can help with avoiding preallocations.
Additionally this release fixes a bug introduced in v1.4.0 where setting IPC socket permissions on Linux did not work.