| Commit message (Collapse) | Author | Age |
| ... | |
| |
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
(#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.
|
| |
|
|
| |
This also deprecates supplemental/util/platform.h.
|
| |
|
|
|
|
| |
The supplemental/util/platform.h is kind of a pain, so we move
move the prototypes for commonly used functions out of there, into
nng.h proper.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
| |
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 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 should avoid folks thinking master represents 1.6.0.)
The next release needs to bump the minor because of the new
option NNG_OPT_REQ_RESENDTICK.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| |
|
| |
Co-authored-by: Christian Fischbach <cfischbach@mac.com>
|
| |
|
|
|
|
|
| |
This introduces a new API, nng_aio_busy(), that can be used
to query the status of the aio without blocking.
Some minor documentation fixes are included.
|
| |
|
|
| |
compile (#1532)
|
| |
|
|
|
|
|
|
|
|
| |
This should give significant performance boosts to anyone using this
protocol. Buffering on both the send and receive side is supported,
with a default buffer size of 16 messages. This should help provide
a reasonable default case for most users.
While here updated the test for bus to much more complete
NUTS style test framework, with increased coverage.
|
| |
|
|
|
|
| |
This function is like nng_device(), but runs asynchronously.
Also, this fixes #1503 nng_device causes nng_close to blocking
|
| |
|
|
| |
closes #1553
|
| |
|
|
| |
fixes #1535 Desire nng_ctx_sendmsg and nng_ctx_recvmsg
|
| | |
|
| |
|
|
|
|
|
| |
Originally the idea was to better support having the transports
be separate loadable modules. This isn't needed for the builtin
transports, so we make the explicit initialization of them
deprecated, and document it as such.
|