| Commit message (Collapse) | Author | Age |
| |
|
|
| |
This bug was already fixed in the main branch.
|
| | |
|
| |
|
|
|
|
|
|
| |
(#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.
|
| |
|
|
|
| |
The realtime clock is not (yet) exposed for user applications, but it
is used for logging timestamps accurately.
|
| | |
|
| |
|
|
|
|
|
|
|
| |
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 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 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.
|
| |
|
|
| |
(This also affects TCP, and fixed there.)
|
| | |
|
| |
|
|
| |
Signed-off-by: Andrey Vostrikov <andrey.vostrikov@cogentembedded.com>
Co-authored-by: Andrey Vostrikov <andrey.vostrikov@cogentembedded.com>
|
| |
|
|
| |
gcc 4.8.5 ). (#1587)
|
| |
|
|
| |
OSX < 10.12)
|
| |
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
|
|
|
|
| |
This should help greatly with performance on older systems such
as CentOS 7 and GCC 4.8. Though, such folks really should update
to newer compilers. Folks running version of GCC earlier than 4.7
will still pay a rather significant performance penalty, as they
still implement atomics with a global mutex.
|
| | |
|
| | |
|
| |
|
|
|
|
| |
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 makes CLOCK_MONOTONIC the default (as it should have been)
for platforms that have it defined, except for Apple platforms which lack
support for using anything other than the real time clock with condition
variables. (And unfortunately silently ignore attempts to do otherwise.)
|
| | |
|
| | |
|
| |
|
|
| |
While not strictly an error, valgrind reports it as an error. This commit zero
initializes the epoll_event before parsing it to the system call.
|
| |
|
|
|
|
| |
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 backs out the changes for #1326, because fchmod on sockets
doesn't actually work on Linux, even though it returns success.
|
| |
|
|
|
|
| |
OpenBSD requires an additional header for both pthread_set_name_np and
pthread_get_name_np.
See http://man.openbsd.org/pthread_set_name_np for details.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If one calls getaddrinfo(3) on OpenBSD like so, it returns -8
EAI_NONAME:
struct addrinfo hints;
struct addrinfo *results;
int rv;
results = NULL;
memset(&hints, 0, sizeof(hints));
hints.ai_flags = AI_ADDRCONFIG;
hints.ai_flags |= AI_PASSIVE;
hints.ai_family = AF_INET;
hints.ai_socktype = SOCK_STREAM;
rv = getaddrinfo("localhost", "", &hints, &results);
In the above code, that mirrors the current logic in resolv_task(), rv
will end up being -8. On non-musl, non-BSD posix systems I
tested (only amd64 Debian), it succeeds and returns 0.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are a few major areas in this change.
* CMake options are now located in a common cmake/NNGOptions.cmake
file. This should make it easier for folks to figure out what
the options are, and how they are used.
* Tests are now scoped with their directory name, which should
avoid possible name collisions with test names.
* A number of tests have been either moved or incorporated into
the newer testutil/acutest framework. We are moving away from
my old c-convey framework to something easier to debug.
* We use CMake directories a bit more extensively leading to a much
cleaner CMake structure. It's not complete, but a big step in the
right direction, and a preview of future work.
* Tests are now run with verbose flags, so we get more test results
in the CI/CD logs.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
| |
This was responsible for hangs in close on FreeBSD. Apparently
our use of EVFILT_USER was incorrect, and rather than fix it, we
have switched to using a notification pipe for synchronizing
closing pipes. In addition to fixing this problem, it should
significantly improve things for NetBSD and OpenBSD, which will
now be able tbenefit from kqueue(), since we no longer depend on
EVFILT_USER.
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
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).
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|