| Commit message (Collapse) | Author | Age |
| |
|
|
|
|
| |
This API exists to support tests and similar cases where port 0 is
used to choose a dynamic port. Once the port is bound, and an actual
value is known, it can be patched in using this API.
|
| |
|
|
|
| |
Temporarily we have removed access to the peer alt names, but
that was never used and was not tested (it also didn't work with WolfSSL.)
|
| |
|
|
|
| |
This hopefully ensures that we have good typed functions instead
of just passing around pointers blithely.
|
| |
|
|
|
|
|
|
| |
This is now replaced with nng_listener_set_security_descriptor
and nng_stream_listener_set_security_descriptor functions. We
may elect to remove these entirely, but for named pipe users they
are probably still quite useful. Moving towards UNIX domain sockets
would obsolete this functionality.
|
| | |
|
| |
|
|
|
| |
These are not needed anymore, and the semantics of string accessors
is brittle, so we want to eliminate these as much as possible.
|
| |
|
|
|
|
|
|
| |
We will be removing these pointer based functions more generally
as we we have type-specific accessors instead.
We also removed the context versions of these functions, which were
not previously documented.
|
| | |
|
| |
|
|
|
| |
This allows a URL object to be used for dialing, which may
be easier than using a string if you already have the URL object.
|
| | |
|
| |
|
|
| |
This is intended to replace NNG_OPT_URL.
|
| |
|
|
| |
This is a step on cleaning up our logic around NNG_OPT_URL.
|
| |
|
|
|
| |
While TCP and UDP port numbers are 16-bits, ZT uses a larger (24-bit)
port number.
|
| |
|
|
|
| |
This provides safety by ensuring that applications do not
depend on the size or layout of nng_url itself.
|
| |
|
|
|
|
|
| |
This eliminates most (but not all) of the dynamic allocations
associated with URL objects. A number of convenience fields
on the URL are removed, but we are able to use common buffer
for most of the details.
|
| |
|
|
|
|
|
| |
Also expose nng_url_sprintf() for users who need it.
This avoids some need to do dynamic memory on some things. Soon
the entirety of nng_url will be allocation free in the usual case.
|
| |
|
|
|
|
|
|
|
|
|
| |
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 functionality was provided principally for libnanomsg compatibility.
This saves some memory and eliminates some pointless functionality.
While here, updated the socket options documentation to remove references
to options already removed.
|
| |
|
|
|
| |
Those old algorithms are not used anywhere, and are not recommended.
TLS 1.2 support has been prevalent for over a decade.
|
| |
|
|
|
|
|
|
|
| |
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 is simpler, and more reliable than using socket options.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
| |
The underlying stream APIs have no need for untyped accessors.
Another step on the road to removal of NNI_TYPE_OPAQUE.
|
| |
|
|
|
| |
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.
|
| |
|
|
|
| |
Support for setting or getting sockaddrs on sockets or on
contexts makes little sense, since these are always transport specific.
|
| |
|
|
|
|
|
|
|
|
| |
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 was not really used or useful.
|
| |
|
|
|
|
|
|
|
|
|
| |
We don't need nng_stream_set_addr nor nng_stream_set_ptr.
These methods are simply not useful for streams, which have
their properties established at creation time.
Arguably in fact, all of nng_stream_set_* could go away --
the only properties it is implemented for are TCP keepalive and
nodelay tuning, and those should be reasonably set by the
creator of the stream.
|
| |
|
|
|
|
| |
TLS is not really merely supplemental anymore. Its pretty fundamental.
Let's make it accessible directly. This will allow us to define
typed property access functions.
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
| |
This should help the compiler enforce checks, and may result
in better optimizations.
|
| |
|
|
|
|
| |
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 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.
|
| |
|
|
|
|
| |
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.
|