| Commit message (Collapse) | Author | Age |
| |
|
|
|
|
| |
Also, some instances nni_aio are changed to nng_aio. We think we want to harmonize
some of these types going forward as it will reduce the need to include headers
hopefully letting us get away with just "defs.h" in more places.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
| |
This is part of our work to improve type safety/awareness, and also
improve debugger support, for NNG error codes. There are still quite
a few more but this should help.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
| |
The API is identical, except that some names have changed, and this is now a
header library in `nng/args.h` - so the core library does not need to carry this
code in binaries. Being a header library also means it is not necessary to
link against NNG, and it does not include any parts of NNG; it only depends on
a standard C99 or C11 environment.
|
| | |
|
| |
|
|
| |
This aligns more closely with the nng_ctx functions.
|
| |
|
|
|
| |
This should simplify things for developers. Just one header to include
in most cases now.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
| |
The test needed a change to ensure that we do not trigger a debugging
check (you cannot submit another job on an aio that you've been notified
is stopped via NNG_ESTOPPED.)
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
This error code results when an AIO is stopped permanently, as a result
of nni_aio_close or nni_aio_stop. The associated AIO object cannot be
used again. This discrimantes against a file being closed, or a temporary
cancellation which might allow the aio to be reused.
Consumers must check for this error status in their callbacks, and not
resubmit an operation that failed with this error. Doing so, will result
in an infinite loop of submit / errors.
|
| |
|
|
|
|
| |
Once a context has started the process of close, further attempts
to close it will return NNG_ECLOSED. What was I thinking to ever
do anything else?
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| | |
|
| |
|
|
|
| |
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 should help the compiler enforce checks, and may result
in better optimizations.
|
| | |
|
| |
|
|
|
| |
This also adds a HUGE test for REP using socket so that we can
discriminate failures that might exist using sockets instead of inproc.
|
| | |
|
| |
|
|
|
|
|
|
|
| |
This includes a manual page documenting the entire set of
functions in one step. The hash is 64-bit based for now, to
be maximally flexible. An internal 32-bit convenience for the
common internal use is also provided (not public).
The public API includes a test suite.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Credit goes to Wu Xuan (@willwu1217) for diagnosing and proposing
a fix as part of #1695. This approach takes a revised approach
to avoid adding extra memory, and it also is slightly faster as we
do not need to update both pointers in the linked list, by reusing
the reap node.
As part of this a new internal API, nni_aio_completions, is introduced.
In all likelihood we will be able to use this to solve some similar
crashes in other areas of the code.
|
| |
|
|
|
|
|
| |
In some places, we use ifdef, and others if.
This normalizes for always using ifdef, so we can compile when
this macro is not defined.
|
| |
|
|
| |
This function needs to be pretty much identical between PAIR v0 and
v1, it was missing just the call to release the pollable resources.
|
| |
|
|
|
|
|
| |
None of these changes are actual security bugs, but GitHub's
scanner reports false positives at Critical severity for them.
(There are a number of complaints from that scanner, many of
which we do not necessarily agree with.)
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
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 makes these functions entirely bullet proof, and eliminates
yet more error handling cases.
|