| Commit message (Collapse) | Author | Age |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* adds nng_dialer_start_aio
This change adds `nng_dialer_start_aio` (if you have a better name, I'm
happy to change it), whose docs read:
> `nng_dialer_start_aio` starts the endpoint dialing asynchronously.
> This is only possible if the dialer is not already dialing. Unlike
> `nng_dialer_start`, this accepts an AIO such that the caller can learn
> when the dialing eventually succeeds or fails. The supplied AIO must
> have been initialized, and is only triggered with the result of the
> first dial attempt.
This new function makes it possible for applications to perform a
non-blocking dial, but still later be notified of the result of that
dial. Arguably, this obviates the need for `NNG_FLAG_NONBLOCK` in
`dialer_start` altogether, but no need to break backwards compatibility.
There is technically a functional change here, which is that the
"Starting dialer for socket" message now gets printed _before_ the dial
is complete in the blocking case, rather than after. It's possible to
change this if we're willing to make the code slightly more complicated,
but given it says "Starting", not "Started", this change felt fine.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This introduces a new experimental transport for DTLS, that
provides encryption over UDP. It has a simpler protocol than
the current UDP SP protocol (but we intend to fix that by making
the UDP transport simpler in a follow up!)
There are a few other fixes in the TLS layer itself, and in
the build, that were needed to accomplish this work.
Also there was an endianness bug in the UDP protocol handling, which
is fixed here.
|
| | |
|
| |
|
|
|
|
| |
This allow to pass constrant string i particular and constant data in general
to nng functions.
Co-authored-by: Garrett D'Amore <garrett@damore.org>
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
| |
This replaces the int, and we will expand this further, as this
makes it clear that the int is actually an error code and helps in
debuggers that can provide symbolic values.
|
| |
|
|
|
|
|
|
| |
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.
|
| | |
|
| | |
|
| |
|
|
| |
Also, clarification and add socket option docs for MAXRECVSZ, RECONNMINT, RECONNMAXT
|
| |
|
|
|
|
|
|
| |
This flag failed to provide real zero copy that it was intended for,
and it also involved extra allocations. Further, the API for it was
brittle and error prone.
Modern code should just work directly with nng_msg structures.
|
| | |
|
| |
|
|
|
| |
This represents an API change, and we remove the nng_aio_begin
function as well, introducing the lightweight nng_aio_reset instead.
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
This will replace nni_aio_schedule, and it includes finishing the
task if needed. It does so without dropping the lock and so is
more efficient and race free.
This includes some conversion of some subsystems to it.
|
| |
|
|
|
|
| |
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?
|
| |
|
|
|
| |
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.
|
| |
|
|
| |
the separation of nni_url and nng_url.
|
| |
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
This is a step on the path to removing unsafe untyped option accesses.
|
| |
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
(#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.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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 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.
|
| |
|
|
|
|
| |
This function is like nng_device(), but runs asynchronously.
Also, this fixes #1503 nng_device causes nng_close to blocking
|
| |
|
|
|
|
| |
(Note that this includes some incorrect formatting due to an apparent
bug in clang-format 13. Hopefully they'll fix it later, but for now
I'm preserving the bad whitespace.)
|
| |
|
|
| |
fixes #1535 Desire nng_ctx_sendmsg and nng_ctx_recvmsg
|
| | |
|