Releases: nanomsg/nng
V2.0.0 Alpha 5 PreRelease
Features
- DTLS support - you can now use DTLS to secure your UDP traffic
ChangeLog
- Windows: Fix regression where no connections after 5 seconds can occur by @gdamore in #2108
- Add EPOLLHUP flag in nni_epoll_thr by @wangchen61698 in #2101
- Req protocol: free msg early if no retries by @shikokuchuo in #2107
- Fixes for TLS by @gdamore in #2121
- FIX [HTTP] fix a blocking case when freeing http client by @JaylinYu in #2123
- Make pointers to data that is not modified const. by @sgh in #2117
- Fix for clang 19 compiler warnings (main branch) by @shikokuchuo in #2113
- TLS: break up the TLS layer a bit to refactor for DTLS. by @gdamore in #2124
- More conversions of errors to nng_err by @gdamore in #2125
- DTLS support by @gdamore in #2131
- Fix typos across docs, comments, and CMake by @mochalins in #2130
- fixes mbedtls 3.6.3 handshake with NULL server name by @elijahr in #2128
- UDP implementation cleanups by @gdamore in #2132
- demos: fix async client by @Zeranoe in #2134
- Dtls tls fixes by @gdamore in #2135
- TLS: fixes for test coverage and improved identification logging. by @gdamore in #2136
- posix tcp: use after free in listener (need to stop before free) by @gdamore in #2137
- TLS: Configuration does not need to keep a reference to the engine. by @gdamore in #2138
- TLS: eliminate more runtime ops vectors by @gdamore in #2139
- DTLS: hold tls configuration by @gdamore in #2141
New Contributors
- @wangchen61698 made their first contribution in #2101
- @sgh made their first contribution in #2117
- @mochalins made their first contribution in #2130
- @elijahr made their first contribution in #2128
- @Zeranoe made their first contribution in #2134
Full Changelog: v2.0.0-alpha.4...v2.0.0-alpha.5
Version 1.11 (Bug fixing release)
This includes a few bug fixes that impacted things for users.
It's unlikely that there will be any new features in the v1 (stable) branch going forward.
What's Changed
- Stable branch: fix for clang 19 compiler warnings by @shikokuchuo in #2104
- Fix TLS test. by @gdamore in #2122
Full Changelog: v1.10.1...v1.11
v1.10.2
Version 2.0.0 Alpha 4
This is an update for the version 2.0.0 work in progress.
Significant work has been in progress on the HTTP framework, and there are breaking API changes.
The docs have gotten more love.
And thanks to @shikokuchuo we have a fix for the long standing Windows IPC hang!
What's Changed
- http test: test HEAD method in server by @gdamore in #2078
- Http no tree exclusive by @gdamore in #2079
- Http no res req by @gdamore in #2080
- Status fix by @gdamore in #2081
- http: use common canonify at request parse time by @gdamore in #2082
- http: server error handling improvements and tests by @gdamore in #2083
- http: fix mishandling of very long headers or URIs, and mishandling o… by @gdamore in #2084
- Http nng err by @gdamore in #2085
- Pipe docs by @gdamore in #2086
- Docs updates by @gdamore in #2087
- http docs: documentation conversion for http handlers by @gdamore in #2088
- fixes #2092 nng_close may hang on Windows by @gdamore in #2095
Full Changelog: v2.0.0-alpha.3...v2.0.0-alpha.4
v1.10.1
What's Changed
This fixes a long standing hang on Windows. Thanks to @shikokuchuo for finding it and the suggested fix!
Full Changelog: v1.10...v1.10.1
2.0.0 Alpha 3 Release
This is the 3rd Alpha Release of NNG 2.0, and it represents a lot of change in the HTTP support.
The main thing is that the APIs for HTTP have totally changed, and they should be much easier to use now. There is no easy conversion guidance, although simple server side applications should convert without too much difficulty.
Header files have changed for some things to make them easier as well, and a number of additional allocations have been removed.
Substantial progress on the mdbook conversion is here too.
There's still a lot more to do, but hopefully this builds enthusiasm!
Version 1.10.0 Release
This release fixes some bugs, and adds some APIs that are available in the development 2.0 release,
in order to facilitate migration to 2.0 (which is not released yet.)
At present we have no concrete plans for future releases on the 1.x stable branch, but will release any critically urgent fixes as needed.
What's Changed
- Silence compiler warnings for Windows by @shikokuchuo in #1888
- Mark some interfaces deprecated, fix version number by @gdamore in #1921
- Integer sign extension bug in socket.c. by @gdamore in #1922
- Introduce new API for subscription by @gdamore in #1924
- Fixes for Windows IPC by @gdamore in #1958
- Fix for seg fault (issue #1959), backport fix into stable branch by @aleksejsolovev in #1980
- Adding nng_socket_close by @gdamore in #2065
- Adding new 2.0 transition APIs by @gdamore in #2070
Full Changelog: v1.9.0...v1.10
2.0.0 Alpha 2 Release
Happy New Year! It's still 2024 as I write this, in my location, but not in others. And not for long!
This release has fixes for various things over alpha 2.0.0 alpha 1. Some notable improvements:
- Introduction of support for socket activation -- see
NNG_OPT_LISTEN_FD
available for TCP, TLS, and on POSIX/Linux, IPC transports and streams layers. - Horizontal scalability of pollers -- epoll, kqueue, port events, and poll all now engage multiple threads, giving the opportunity to engage with multiple CPU cores. This should have a marked improvement on larger systems.
- More allocations removed, more dereferences removed.
- Hot code paths no have eliminated at least one pair of lock entry/exits vs alpha 1. (Which was already improved.)
- More of documentation is converted.
- Test suites are more reliable (pesky EADDRINUSE bugs are hopefully squashed now)
The nng_close
function is renamed to nng_sock_close
, as a heads up... so pay attention to the migration guide! (There is a macro, NNG1_MIGRATION
that can be set to provide a macro to aid in transition.
v2.0.0-alpha.1
Summary
This is the first "alpha" release of 2.0.0. Note that this is very much a work in progress, and stability is not guaranteed.
There will be more breaking changes coming. But to help with early adoption and testing, this is posted.
Reminder: If you want stability or need to use in production, please consider the "stable" branch instead.
The main changes here involve these major areas:
- New UDP transport
- Performance enhancements - fewer allocations, fewer locks -- this is an ongoing effort
- Documentation changing to mdbook
- Removal of some legacy support and refactoring some others to be less error prone
This version is NOT compatible with NNG 1.x at an API level -- there are breaking changes so please see the migration guide https://github.com/nanomsg/nng/blob/main/docs/ref/migrate/nng1.md.
Known Issues
- The docs are a work in progress ... its only about halfway through the mdbook conversion so far
- The optional ZeroTier transport is utterly broken (it likely won't even compile) - plan is to remove it, possibly rewriting it entirely later
- During tests, it is possible for an occasional object to get leaked (TCP test sometimes leaks a connection object) -- there are races during finalization... note that this is not a "recurring" leak, so its pretty benign.
- If you call
nng_fini
to quickly after setting things up, websocket/http may crash with use after free. The workaround right now is to wait a few dozen msec before callingnng_fini
(or don't call it at all for a regular application!). This will be fixed by better use of reference counting in the near future.
What's Changed
- Gdamore/udp by @gdamore in #1879
- fix broken link to BUILD_TLS by @jan-ruzicka-c in #1872
- Fixes Compiler Warnings (Windows) by @shikokuchuo in #1877
- posix: add getentropy() based RNG by @gdamore in #1880
- Gdamore/oldeps by @gdamore in #1881
- Bump checkout action to v4. by @gdamore in #1882
- Actually enable UDP. Also fix some UWYI includes. by @gdamore in #1883
- fix aio test failures on darwin by @gdamore in #1884
- Bump codecov to v4 by @gdamore in #1885
- Missed config option for UDP by @gdamore in #1886
- udp: fix leaks on EP destroy by @gdamore in #1887
- UDP: add some statistics by @gdamore in #1889
- Gdamore/udp stats tests by @gdamore in #1891
- UDP: burst testing to improve coverage by @gdamore in #1892
- Gdamore/statslock by @gdamore in #1894
- Use
const
for nng_stat when possible. by @gdamore in #1895 - remove legacy support for configuration of transport options on socket by @gdamore in #1897
- Remove the libnanomsg compatibility layer by @gdamore in #1898
- Gdamore/tls api by @gdamore in #1899
- Gdamore/stream set gone by @gdamore in #1901
- NNI_GETXX macros are brittle due to casting mistake. by @gdamore in #1904
- NNG_OPT_RECVFD and NNG_OPT_SENDFD converted to functions. by @gdamore in #1905
- Gdamore/no ctx addr by @gdamore in #1906
- Gdamore/socket by @gdamore in #1908
- Replace NNG_OPT_SUB_SUBSCRIBE/UNSUBSCRIBE with functions. by @gdamore in #1909
- Gdamore/no untyped pipe get by @gdamore in #1910
- Gdamore/no ctx untyped by @gdamore in #1911
- Socket option handling clean ups for endpoints. by @gdamore in #1912
- Gdamore/new acutest by @gdamore in #1913
- Gdamore/udp burst tune by @gdamore in #1916
- UDP: prefer new packets (drop older) by @gdamore in #1917
- Gdamore/ipc test by @gdamore in #1918
- Gdamore/more tests by @gdamore in #1919
- Add matrix of TLS engines, including wolfSSL by @gdamore in #1923
- TLS configuration changed to use discret _set_tls and _get_tls functi… by @gdamore in #1925
- websocket: Do not allow a listener or dialer to change TLS while running by @gdamore in #1926
- New init by @gdamore in #1927
- tls: remove support for TLS 1.0 and 1.1. by @gdamore in #1931
- tls: add ecdsa test case by @gdamore in #1932
- remove NNG_OPT_SOCKNAME (and socket names altogether) by @gdamore in #1933
- tcp/tls: Remove support for local interface address in dialer URLs by @gdamore in #1934
- fix parsing bug in abstract URLs by @gdamore in #1935
- intern URL scheme by @gdamore in #1936
- Nng url no alloc by @gdamore in #1937
- Url accessors by @gdamore in #1938
- Gdamore/more opt url by @gdamore in #1939
- Tls mutual test by @gdamore in #1940
- Ipc tests by @gdamore in #1941
- No reqctx test by @gdamore in #1942
- option parser: test for no clustering support by @gdamore in #1943
- http: constify some functions by @gdamore in #1944
- No more sec desc option by @gdamore in #1945
- Remove all the get_ptr option accessors. by @gdamore in #1946
- Tls no extra resolver by @gdamore in #1947
- Nuts tests by @gdamore in #1952
- Http server race by @gdamore in #1953
- windows ipc: check the return value of nni_aio_schedule by @gdamore in #1956
- sockfd: check the result of nni_aio_schedule by @gdamore in #1957
- Htnuts by @gdamore in #1962
- fixes #1959 Occasional SIGSEGV in nng_recv_aio() on a respondent socket by @aleksejsolovev in #1960
- fixes #1408 Reference count as a first class type by @gdamore in #1963
- Add forgotten license boilerplate by @aleksejsolovev in #1965
- Aio reap noreschedule by @gdamore in #1966
- aio: stop has to wait for expirations to finish by @gdamore in #1967
- reap: thread exits prematurely after reinitialization by @gdamore in #1968
- Pipe null by @gdamore in #1969
- udp: hang on close after sending too large by @gdamore in #1970
- aio: make sure aio is initialized before certain operations by @gdamore in #1971
- ctx: Simplify handling for closed contexts. by @gdamore in #1972
- performance: reference counters can use relaxed order when incrementing by @gdamore in #1973
- websocket: inline the aios by @gdamore in #1974
- nuts: try to avoid address in use for most tests by @gdamore in #1975
- device: fixes for socket holds and leaking aio data by @gdamore in #1977
- aio: task_abort was a mistake by @gdamore in #1978
- Listener inline by @gdamore in #1981
- Windows iopc no close by @gdamore in #1984
- ipc transport: convert to using inline data structures by @gdamore in #1982
- Tcp stop by @gdamore in #1985
- streams: add explicit stop functions by @gdamore in #1987
- Http aio init by @gdamore in #1988
- Tcptran aio inline by @gdamore in #1989
- Inproc ref by @gdamore in #1990
- Tls inline 2 by @gdamore in #1991
- Websocket inline by @gdamore in #1992
- Websock stop by @gdamore in #1994
- syslog: test for existence by @gdamore in #1995
- POSIX poller: add support for select, and for choosing the poller by @gdamore in #1996
- Expose pfd by @gdamore in #1998
- Poll alloc by @gdamore in #1999
- workflows: add pollq and make build debug for backtraces by @gdamore in #2000
- workflows: only generate docs when appropriate, and don't do...
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