| Commit message (Collapse) | Author | Age |
| | |
|
| | |
|
| |
|
|
| |
This is meant to help applications start adopting new interfaces before converting to NNG 2.0
|
| |
|
|
|
|
| |
These are the 2.0 equivalent versions of nng_send_aio and nng_recv_aio.
The old names are preserved as aliases for the new. Applications can
start adopting these with this release, even before 2.0 is ready.
|
| | |
|
| |
|
|
|
|
| |
These are new functions that replace `NNG_OPT_SUBSCRIBE` and
`NNG_OPT_UNSUBSCRIBE`. They are provided here as a transition
aid before those options are removed in NNG 2.0.
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
These functions were added in the main branch for NNG 2.0, and
we add them here to facilitate converting any code that happened
to use the options (`NNG_OPT_PROTO`, `NNG_OPT_PROTONAME`,
`NNG_OPT_PEER`, `NNG_OPT_PEERNAME`, and `NNG_OPT_RAW`.
Its unlikely that many applications need this, but providing these
as a transition aid may help applications start adopting new APIs now.
|
| |
|
|
| |
We forgot to do this for 1.9.0, which incorrectly claims to be 1.8.0.
|
| | |
|
| | |
|
| |
|
|
|
|
| |
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.
|
| | |
|
| |
|
|
|
|
|
| |
* Add & document msg_capacity, msg_reserve
* reserve/capacity code style
* Documentation references to reserve/capacity
|
| |
|
|
|
|
| |
This bug can easily lead to memory overruns if a program relies
on the nng_sockaddr_storage instad of just allocating a vanilla
nng_sockaddr.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 should reduce the amount of copying, and the overall size
used by pipes and other objects quite a bit. (On my system, the
sizeof nni_pipe shrank by 400 bytes, for example.)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|