summaryrefslogtreecommitdiff
path: root/src/core
Commit message (Collapse)AuthorAge
* fix source formattingshikokuchuo2025-03-16
|
* fix aio_reap_list use of nni_aio_free() pointer to incorrect function type ↵shikokuchuo2025-03-16
| | | | UBSAN warning
* api: introduce NNG 2.0 compatible nng_dialer_get_url and nng_listener_get_urlGarrett D'Amore2025-01-04
| | | | This is meant to help applications start adopting new interfaces before converting to NNG 2.0
* fix aio test failures on darwinGarrett D'Amore2025-01-03
| | | | | | | Actually this test appears to be broken everywhere, and the only reason it ever worked is that we took > 50 ms to context switch. (cherry picked from commit 1a4d71cdd4ff80bb79d842c081296c298e7b2295)
* sockfd: check the result of nni_aio_scheduleGarrett D'Amore2024-12-07
| | | | This fixes a possible failure condition on teardown.
* Add nng_sub0_subscribe and friends.Garrett D'Amore2024-11-11
| | | | | | These are new functions that replace `NNG_OPT_SUBSCRIBE` and `NNG_OPT_UNSUBSCRIBE`. They are provided here as a transition aid before those options are removed in NNG 2.0.
* Add new functions for socket identity.Garrett D'Amore2024-11-11
| | | | | | | | | | These functions were added in the main branch for NNG 2.0, and we add them here to facilitate converting any code that happened to use the options (`NNG_OPT_PROTO`, `NNG_OPT_PROTONAME`, `NNG_OPT_PEER`, `NNG_OPT_PEERNAME`, and `NNG_OPT_RAW`. Its unlikely that many applications need this, but providing these as a transition aid may help applications start adopting new APIs now.
* Integer sign extension bug in socket.c.Garrett D'Amore2024-11-08
| | | | | | | | It turns out that for now this results in early wakeups, due to another bug in the aio framework. But when that bug is fixed, this bug will lead to hangs when redialing. (cherry picked from commit 2dfb99506142f2d59bcc0e0fa7db6b19a3c75d43)
* Mark some functions that are useless as deprecatedGarrett D'Amore2024-11-07
|
* log: eliminate redundant newlines sometimes presentGarrett D'Amore2024-08-14
|
* idhash: add nng_id_visit APIGarrett D'Amore2024-08-11
| | | | | | This allows an efficient way to iterate over the entries stored in an ID hash. The iteration is fast, and requires no additional storage. The order of iteration is not guaranteed.
* fixes #1835 setting NNG_OPT_TLS_CONFIG on socket should hold referenceGarrett D'Amore2024-07-21
|
* UDP: Introduce an experimental (undocumented for now) public API for UDP. ↵Garrett D'Amore2024-06-02
| | | | | | | | (#1838) This exposes the UDP methods as nng_ methods, and adds support for Multicast Membership, which is useful in a variety of situations. No documentation is provided, and applications should consider thios API experimental.
* Safer initialization of aiosGarrett D'Amore2024-05-30
|
* fix for pipe statistic crashGarrett D'Amore2024-05-30
|
* fixes #1827 Windows a deadlock on nng_close()Garrett D'Amore2024-05-30
|
* fix deadlock on socket closeAlexander Zilberkant2024-04-24
| | | | when an `aio` has no `a_cancel_fn` and the task is in `task_prep` abort it on `nni_aio_stop` call
* fixes #1808 nng_msg_insert: munmap_chunk(): invalid pointerGarrett D'Amore2024-04-24
| | | | | | | With specific message sizes, we the shuffle of data for msg insert can calculate the wrong value, leading to heap corruption. This includes a stress test for msg insert to hopefully exercise every reasonable edge case.
* Logging improvements (#1816)Garrett D'Amore2024-04-21
| | | | | | | | | | | | * Add nng_str_sockaddr to get string representation of socket address. * Added nng_log_get_level() is meant to allow users to obtain the current level and avoid some possibly expensive operations just to collect debugging information when debugging is not in effect. We use a custom logger for NUTS, and this fits within the NUTS test framework well, so that if -v is supplied we get more content. All tests now get this by default.
* Announce NNG version in log.Garrett D'Amore2024-04-14
|
* Log rejects by app, bind/listen/connect failures.Garrett D'Amore2024-04-14
|
* Added realtime clock support, and better timestamping.Garrett D'Amore2024-04-14
| | | | | The realtime clock is not (yet) exposed for user applications, but it is used for logging timestamps accurately.
* minor include fixGarrett D'Amore2024-04-14
|
* fixes #543 Add logging support frameworkGarrett D'Amore2024-04-13
|
* Update protocol.hBrian Carcich2024-03-16
| | | Fix comment typo
* fixes #1496 Provide NNG_ENABLE_IPV6 option (disabled by default)Garrett D'Amore2024-02-25
| | | | | | | | | This also checks if the build system has the definitions for AF_INET6, which might help in some embedded IPv4 only settings. The resolver test is enhanced to include a check for IPv6 enabled in the kernel. IPv6 support is enabled by default, of course.
* New CMAKE option NNG_ENABLE_COMPAT (defaults ON)Garrett D'Amore2024-01-27
| | | | | | This option allows the compatibility code to be elided from the build. This saves build time, and eliminates bloat from a static library when used strictly in native NNG mode.
* Fix warning from inconsistent socket_pair prototype.Garrett D'Amore2024-01-06
|
* silence compiler warning from minimum int constantGarrett D'Amore2024-01-01
|
* fixes #1572 nng creates too many threadsGarrett D'Amore2024-01-01
| | | | | | | | | | | | This further limits some of the thread counts, but principally it offers a new runtime facility, nng_init_set_parameter(), which can be used to set certain runtime parameters on the number of threads, provided it is called before the rest of application start up. This facility is quite intentionally "undocumented", at least for now, as we want to limit our commitment to it. Still this should be helpful for applications that need to reduce the number of threads that are created.
* Comment typoGarrett D'Amore2024-01-01
|
* fixes #1751 Support nng_aio_set_expire().Garrett D'Amore2023-12-30
| | | | While here fixed a number of nits in comments.
* fixes #1740 Public ID hash APIGarrett D'Amore2023-12-29
| | | | | | | | | This includes a manual page documenting the entire set of functions in one step. The hash is 64-bit based for now, to be maximally flexible. An internal 32-bit convenience for the common internal use is also provided (not public). The public API includes a test suite.
* fixes #1746 Create a new socket:// transport for socketpair() based connectionsGarrett D'Amore2023-12-29
| | | | | | | | | | | | | This transport only listens, and creates connections when the application calls setopt on the lister with NNG_OPT_SOCKET_FD, to pass a file descriptor. The FD is turned into an nng_stream, and utilized for SP. The protocol over the descriptor is identical to the TCP protocol (not the IPC protocol). The options for peer information are borrowed from the IPC transport, as they may be useful for these purposes. This includes a test suite and full documentation.
* fixes #1729 remove nni_timerGarrett D'Amore2023-12-17
|
* fixes #1728 surveyor could be simplified to not use timerGarrett D'Amore2023-12-17
|
* fixes #1523 rare SEGV in sub nni_list_removeGarrett D'Amore2023-11-25
| | | | | | | | | | | | Credit goes to Wu Xuan (@willwu1217) for diagnosing and proposing a fix as part of #1695. This approach takes a revised approach to avoid adding extra memory, and it also is slightly faster as we do not need to update both pointers in the linked list, by reusing the reap node. As part of this a new internal API, nni_aio_completions, is introduced. In all likelihood we will be able to use this to solve some similar crashes in other areas of the code.
* fix: use ifdef for NNG_HAVE_BACKTRACEMarco Casaroli2023-11-25
| | | | | | | In some places, we use ifdef, and others if. This normalizes for always using ifdef, so we can compile when this macro is not defined.
* fix: use ifdef for NNG_ENABLE_STATSMarco Casaroli2023-11-25
| | | | | | | In some places, we use ifdef, and others if. This normalizes for always using ifdef, so we can compile when this macro is not defined.
* fixes #1619 expose expire threads tunablesPaulo Henrique Silva2023-08-27
| | | | | | | | | | | | | | | | | | This change makes expire threads tunable follows the same strategy as taskq threads tunables. Add NNG_NUM_EXPIRE_THREADS to override the default behavior (`n_cpu` expire threads). The NNG_MAX_EXPIRE_THREADS limit is always applied if > 0, even if you specify the desired number of threads using NNG_NUM_EXPIRE_THREADS. NNG_EXPIRE_THREADS is not used anymore. This was only referenced in the code but never defined on CMake. The logic to cap expire threads between 1 and 256 was removed. If users set no limits, whatever value they choose will be used instead of being silently overridden by us.
* fix copyrightsGarrett D'Amore2023-04-23
|
* fixes #1658 Possible use-after-free in dialerGarrett D'Amore2023-04-23
|
* fixes #1657 Use after free in listener (data race)Garrett D'Amore2023-04-23
|
* fixes #1619 Expose NNG_MAX_EXPIRE_THREADS via CMakeGarrett D'Amore2023-04-19
|
* Birth pipe object with non-zero reference.Garrett D'Amore2023-04-19
|
* fixes #1610 nni_sock_open() in socket.c: use after freeGarrett D'Amore2023-04-19
|
* Socket close may leak messages.Garrett D'Amore2023-02-07
| | | | | | We try to move the msgq close up earler. While here we can stop dropping and reacquiring the lock -- this is likely left over and may lead to races.
* Revert "fixes 1543 (#1616)"Garrett D'Amore2023-02-05
| | | | This reverts commit 8461c7207b440f5ba8c51b2236fcfa178f415a6f.
* Don't bump error counters for NNG_ECLOSED.Garrett D'Amore2023-02-05
|
* fixes 1543 (#1616)josh salit2023-02-05
| | | fixes #1543 by aborting tasks that may have been prepped, but not yet started.