| Commit message (Collapse) | Author | Age |
| | |
|
| |
|
|
|
|
| |
This also restores the IPv6 sanity check. Note that UDP is still
not supported as a transport, but this can be used to implement
higher level transports such as ZeroTier (or later QUIC).
|
| | |
|
| |
|
|
|
|
|
|
|
| |
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 looks like a possible problem that may be windows specific involving
the flow for IO completion ports. This simplifies the logic a little bit,
and should ensure that canceled requests on pipes do not restart.
|
| | |
|
| |
|
|
|
| |
This also adds a HUGE test for REP using socket so that we can
discriminate failures that might exist using sockets instead of inproc.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
Try to use the Mbed TLS cmake configuration data if present, and
refactor our FindModule to adhere to the same basic API.
|
| |
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
|
|
|
|
|
| |
We accidentally made idhash not public by not publishing its header
in the right place. This is really generic utility stuff, so we
have posted it in the nng/supplemental/util/ directory.
We've also removed the ability to remove this -- its a very small amount
of additional code, as its just a wrapper on top of mandatory functionality.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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 (defaults to 8) sets a limit on the number of poller threads
that will be used for servicing I/Os. This is the size of the
I/O completion port thread pool on Windows. POSIX pollers are generally
not concurrent at present.
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
| |
Again, this was racy code, and not well tested. Set this option
before starting the endpoint if you need to be sure.
|
| |
|
|
| |
This code was not well tested, and is racy as well.
|
| |
|
|
|
| |
This eliminates some code. A test is added as well, so this should
help with coverage.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
It's not absolutely clear that this fixes all of the possible
cases, but we're hopeful that this does -- and in any event the
bug does not seem to reproduce easily anymore.
|
| |
|
|
| |
fixes #1733 deadlock in websocket listener close
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This eliminates the req protocols use of nni_timer (and setting
a single timer node per request. This was problematic because it
devolves into O(n^2) as we wind up inserting timer nodes and having
to scan the list for the timer node.
The solution is to use a single scan - stop worrying about insertion,
but instead use a coarse granularity timer (defaults to 1 second)
for retries. Then do the O(n) scan just once per interval.
A new option, NNG_OPT_REQ_RESENDTICK, can be used to change the tick
interval for cases (like unit tests) where more fine grained timing
is required.
|
| |
|
|
|
|
| |
The aio for connections was meant to have an infinite sleep (no
timeout), but was getting an initial value of zero, so we were spinning
on accept.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
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 also affects TCP, and fixed there.)
|
| |
|
|
|
| |
fix compile error in nano using clang version 16.0.5
fix issue: https://github.com/nanomsg/nng/issues/1676
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|