| Commit message (Collapse) | Author | Age |
| |
|
|
|
|
|
|
|
| |
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 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.
|
| |
|
|
|
|
|
| |
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 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.
|
| |
|
|
|
| |
fix compile error in nano using clang version 16.0.5
fix issue: https://github.com/nanomsg/nng/issues/1676
|
| |
|
| |
From the Windows docs, this option must receive as parameters the listener socket.
|
| |
|
|
|
|
|
|
|
|
| |
* Fixes compiling on Windows with Mingw
Fixes the build error: "InterlockedDecrementAcquire64 not defined" on Mingw
* fixes semantics of InterlockedDecrementRelease64 on Mingw
From Microsoft docs, InterlockedDecrementRelease64 returns the resulting decremented value.
The equivalent function on Mingw is `__atomic_sub_fetch`, not `__atomic_fetch_sub` (which returns the previous value).
|
| |
|
|
| |
(#1591)
|
| |
|
|
|
|
| |
This takes one less parameter, and is simpler. It will let us
reclaim the aio_prov_extra data space as well, so that we can
use it for other purposes.
|
| |
|
|
|
| |
Note that one of these warning is a real bug that would prevent
TLS from functioning properly on Windows.
|
| |
|
|
|
|
|
|
| |
* use correct LONG type for nni_atomic_flag on win32
* use InterlockExchangeAdd for nni_atomic_get_bool
- this is equivelent to InterlockAdd for the purposes of this call (since it is adding 0)
- this allows the code to compile on 32bit windows
|
| | |
|
| |
|
|
|
|
| |
This eliminates some run-time initialization, moving it to compile time.
Additional follow up work will expand on this to simplify initialization
and reduce the need for certain locks.
|
| |
|
|
|
| |
This is initially used for TLS to make loading the engine pointer
faster, eliminating a much more expensive lock operation.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
| |
This provides the initial implementation, and converts the
transport lookup routines to use it. This is probably of limited
performance benefit, but rwlock's may be useful in further future work.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a sweeping cleanup of the transport logic around options,
and also harmonizes the names used when setting or getting options.
Additionally, legacy methods are now moved into a separate file and
can be elided via CMake or a preprocessor define.
Fundamentally, the ability to set to transport options via the socket
is deprecated; there are numerous problems with this and my earlier
approaches to deal with this have been somewhat misguided. Further
these approaches will not work with future protocol work that is
planned (were some options need to be negotiated with peers at the
time of connection establishment.)
Documentation has been updated to reflect this. The test suites still
make rather broad use of the older APIs, and will be converted later.
|
| |
|
|
|
| |
This doesn't modularize all the tests yet, but it goes a long way
in the right direction.
|
| | |
|
| |
|
|
|
| |
This also contains the start of some CMakefile refactoring and
clean ups.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
fixes #1326 Linux IPC could use fchmod
fixes #1327 getsockname on ipc may not work
This introduces an abstract:// style transport, which on Linux
results in using the abstract socket with the given name (not
including the leading NULL byte). A new NNG_AF_ABSTRACT is
provided. Auto bind abstract sockets are also supported.
While here we have inlined the aios for the POSIX ipc pipe
objects, eliminating at least one set of failure paths, and
have also performed various other cleanups.
A unix:// alias is available on POSIX systems, which acts just
like ipc:// (and is fact just an alias). This is supplied so
that in the future we can add support for AF_UNIX on Windows.
We've also absorbed the ipcperms test into the new ipc_test suite.
Finally we are now enforcing that IPC path names on Windows are
not over the maximum size, rather than just silently truncating
them.
|
| |
|
|
|
|
|
|
|
|
| |
fixes #1317 IPv6 listener get port is incorrect
fixes #1319 Want symbolic service names
This is phase 1 of reducing the memory foot-print of aios, and
also of pipes. This removes the largest consumer the socket
address information, from the aio, which was only used by a few
consumers.
|
| | |
|
| |
|
|
|
|
| |
This also exposes an nng_thread_set_name() function for
applications to use. All NNG thread names start with "nng:".
Note that support is highly dependent on the operating system.
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
fixes #1224 wss fails on IPV6 address
This fixes bugs and inconsistencies in the way addresses are
handled for HTTP (and consequently websocket). The Host:
address line needs to look at numeric IPs and treat wildcards
as if they are not specified, and needs to understand the IPv6
address format using brackets (e.g. [::1]:80).
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
The TTL in these cases should have been atomic. To facilitate
things we actually introduce an atomic int for convenience. We
also introduce a convenience nni_msg_must_append_u32() and
nni_msg_header_must_append_u32(), so that we can eliminate some
failure tests that cannot ever happen. Combined with a new test
for xreq, we have 100% coverage for xreq and more coverage for
the other REQ/REP protocols.
|
| |
|
|
|
| |
This also introduces an nni_atomic_cas64 to help with lock-free designs.
Some mechanical renaming was done in some of the protocols for spelling.
|
| |
|
|
|
|
| |
When using the 32-bit Windows compiler, the functions
InterlockedIncrementAcquire64() and and InterlockedDecrementRelease64() are not
defined. So we fall back to the more generic InterlockedAcquire64() and
InterlockedDecrement64() on 32-bit Windows.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
This also introduces a new atomic boolean type, so we can use that
to trigger whether we've added the HTTP handler or not.
|
| |
|
|
|
|
| |
This includes changes to support setting the sanitizer *correctly*
(the old code CMake stuff didn't quite get it right), and addresses
a number of failures in the test code found by the address sanitizer.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
This also introduces a more efficient reference counting usage based
on atomics, rather than locks.
|
| |
|
|
|
| |
This permits the stats dump to avoid some extra buffering,
and resolves a complaint about possible format buffer overruns.
|