| Commit message (Collapse) | Author | Age |
| |
|
|
| |
This is meant to help applications start adopting new interfaces before converting to NNG 2.0
|
| |
|
|
|
|
|
| |
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)
|
| |
|
|
| |
This fixes a possible failure condition on teardown.
|
| |
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
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)
|
| | |
|
| | |
|
| |
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
|
|
|
|
| |
(#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.
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
when an `aio` has no `a_cancel_fn` and the task is in `task_prep` abort it on `nni_aio_stop` call
|
| |
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
| | |
|
| | |
|
| |
|
|
|
| |
The realtime clock is not (yet) exposed for user applications, but it
is used for logging timestamps accurately.
|
| | |
|
| | |
|
| |
|
| |
Fix comment typo
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
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.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
| |
While here fixed a number of nits in comments.
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
| |
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.
|
| |
|
|
| |
This reverts commit 8461c7207b440f5ba8c51b2236fcfa178f415a6f.
|
| | |
|
| |
|
| |
fixes #1543 by aborting tasks that may have been prepped, but not yet started.
|
| |
|
| |
Fix for UBSAN error. As `id_reg_map` is initialised as NULL and passing NULL to `memcpy()` is undefined. Should make no difference to compiled code. Purely to appease the automated checks I have to deal with on my side. Thanks!
|
| | |
|