| Commit message (Collapse) | Author | Age |
| ... | |
| |
|
|
|
|
|
|
|
|
|
| |
The idea here is to reduce the dynamic allocations used for
URLs, and also the back and forth with parsing begin strings
and port numbers. We always resolve to a port number, and
this is easier for everyone.
The real goal in the long term is to eliminate dynamic allocation
of the URL fields altogether, but that requires a little more
work. This is a step in the right direction.
|
| |
|
|
|
| |
This was an undocumented capability provided for libnanomsg. The
correct way to obtain the same functionality is to use `NNG_OPT_LOCADDR`.
|
| |
|
|
|
|
|
|
|
| |
Applications must now call nng_init(), but they can supply
a set of parameters optionally. The code is now safe for
multiple libraries to do this concurrently, meaning nng_fini
no longer can race against another instance starting up.
The nni_init checks on all public APIs are removed now.
|
| |
|
|
| |
This also covers a few test cases that we were missing.
|
| |
|
|
| |
This is simpler, and more reliable than using socket options.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
Adds test cases for this and for remote pipe as well.
|
| |
|
|
|
| |
This seems to give much higher reliability in message receives,
so we've tightened it up a bit for now.
|
| |
|
|
|
|
| |
The burst test should be more reliable (by avoiding extra work during the
hot code path). We also make the threshold for pass/failure tunable via
an environment variable (NNG_UDP_PASS_RATE) which is a percentage.
|
| |
|
|
|
| |
This lets us see that we are skipping tests due to lack of support,
and makes it a little clearer to an observer.
|
| |
|
|
|
|
|
|
| |
This also fixes a couple of minor bugs -- changing the socket name
could be incorrect as the termination was not applied properly,
and the ZeroTier code got a change -- note that it is only possible
in this revised version to pass a single moon ID for ZT orbit.
The ZT code is a bit stale, and untested anyway.
|
| | |
|
| | |
|
| |
|
|
| |
This is a step on the path to removing unsafe untyped option accesses.
|
| | |
|
| |
|
|
|
| |
The main purpose is to eliminate the NNI_TYPE_OPAQUE options,
by putting these into their own first class, protocol-specific, functions.
|
| |
|
|
| |
Similar to the other identities, this simplifies code a bit.
|
| |
|
|
|
|
| |
Socket options were a little awkward, and these are core properties
of the socket. Few if any applications need these. This also avoids
some dynamic allocations.
|
| |
|
|
|
|
|
|
|
|
| |
These options are removed entirely, and their functionality is now
available via special functions, `nng_socket_get_send_poll_fd` and
`nng_socket_get_recv_poll_fd`, making these first class methods on
the socket.
This eliminates a bit of wasteful code, and provides type safety
for these methods.
|
| |
|
|
|
|
|
|
| |
This is a breaking change.
TLS configuration changes are to be made using TLS configuration
objects, and then set on a listener or dialer with NNG_OPT_TLS_CONFIG.
This should be a bit less racy, and allows for simpler code.
|
| |
|
|
|
|
|
|
|
| |
Transport specific options should be configured on the end point.
This has the most impact for TLS, as TLS dialers and listeners will
need to be allocated apriori, to configure TLS options.
Some legacy tests were removed... we're going to remove the legacy
libnanomsg compatibility layer anyway.
|
| |
|
|
|
| |
This should help the compiler enforce checks, and may result
in better optimizations.
|
| |
|
|
|
| |
This starts by updating UDP to use this approach, since we already
have a convenient lock. We should look at doing the same for other stats.
|
| |
|
|
|
| |
Unfortunately for now we have the struct itsel,f but it can become
mostly empty.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
We are finding that on darwin its very easy for us to lose UDP messages
as the socket buffer appears to be depressingly small.
|
| |
|
|
|
|
| |
There were several bugs here, including use-after-free,
a problem when the copy limit was exceeded, and uninitialized
receive thresholds.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
| |
This also allows to remove most of the transport headers.
Only zerotier.h sticks around, and only for now. (We expect to
eject it into a separate module.)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is the initial implementation of UDP transport.
It does in order guarantees (and consequently filters duplicates),
but it does not guarantee delivery. The protocol limits payloads
to 65000 bytes (minus headers for SP), but you really want to
keep it to much less -- probably best for short messages that within
a single MTU to avoid IP fragmentation and reassembly.
This is unicast only for now (although there are plans for some
support for multicast and broadcast as well as being able to
perform automatic mesh building, but that will be in following work.
Additional tunables are coming. This is only lightly tested at
this point, and should be considered experimental. Its also undocumented.
|
| |
|
|
| |
This is in preparation for the wolfSSL integration.
|
| | |
|
| |
|
|
|
|
| |
This also adds an SP layer transport test for TLS, based on the TCP
test but with some additions; this test does not cover all the edge
cases for TLS, but it does at least show how to use it.
|
| |
|
|
|
|
| |
NNG_TRANSPORT_ZEROTIER is enabled.
It seems that there are typo in the struct type naming. And the wrong function name in `nni_sp_zt_register` that will cause link error.
|
| |
|
|
|
|
|
|
| |
This seems to alleviate the use after free crashes, although it
does not seem like it should. Current theory is that this closes
the handle ensuring that it is unregistered from the I/O subsystem,
thus preventing callbacks from firing and referring to objects that
have been freed.
|
| |
|
|
|
|
|
|
| |
When closing pipes, we defer them to be reaped, but also leave
them in the match list where they might be picked up by ep_match,
or leak. It's best to reap these proactively and ensure that they
are not allowed to life longer once they have errored during the
negotiation phase.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
| |
|
|
|
| |
Also while here, remove unused sockaddr members from some structs.
This should save a bit of memory for servers with a lot of conns.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
| |
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 also adds a HUGE test for REP using socket so that we can
discriminate failures that might exist using sockets instead of inproc.
|