| Commit message (Collapse) | Author | Age |
| | |
|
| |
|
|
|
| |
There is no valid use for this, once we added the ability to
query the bound port.
|
| |
|
|
|
|
|
|
|
|
|
| |
More direct access methods are provided instead.
This results in much lower friction when using, and is a step on the path
to removing NNG_OPT_LOCADDR as well.
We need to figure a solution for NNG_OPT_LOCADDR for dialers; for
listeners there is little use in it either, and it will be removed.
(Dialers will probably get a new NNG_OPT_BIND_IP option.)
|
| |
|
|
| |
These functions can no longer fail.
|
| |
|
|
|
|
| |
The ops vector / protocol API/ABI were meant to support external
implementations, but we have moved away from having pluggable protocols,
and we aren't likely to support it any time soon.
|
| |
|
|
|
|
|
|
| |
This is going to be used to facilitate debugging, and eliminate some
inconveniences around these things. We plan to move the pipe functions
to use these directly, hopefully moving away from the pipe_getopt hack.
(The transport API will need to grow these. For now this is just the
streams.)
|
| |
|
|
|
|
|
|
|
|
|
| |
We are *only* supporting 3.5 (or newer 3.x releases) as its the newest LTS version of OpenSSL.
This supports the full set of TLS features with NNG, including DTLS, PSK, TLS 1.3, etc.
Future work will explore making using of the QUIC support in OpenSSL.
Note that this OpenSSL work sits on top of NNG's TCP streams, so it cannot benefit from
Linux in-kernel TLS or other features such as TCP fast open at this time.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
This changes the header files mostly in the protocols to include
directly rather than through the commmon nng_impl.h header. This
should lead to faster compiles, and by properly making all includes
relative should reduce friction with language servers and other tooling.
|
| |
|
|
|
|
|
| |
This avoids needless allocations, and we offer for pipes (which need
this because they might be ephemeral) the get_strdup, get_strcpy,
and get_strlen forms. (Those do the copying or allocations while holding
the pipe reference.)
|
| |
|
|
|
|
| |
This will replace the NNG_OPT_TLS_PEER_ALTNAMES and NNG_OPT_TLS_PEER_CN
properties, and gives a bit more access to the certificate, as well as
direct access to the raw DER form, which should allow use in other APIs.
|
| |
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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 was responsible for breaking DTLS, and likely other things we
never noticed, if the pointer passed in was not already a uint8_t *.
|
| |
|
|
| |
This is occurs normally on socket close and the error messages were alarming.
|
| |
|
|
|
| |
This simplifies the code to just use a precompiled static list.
This should be lighter weight, and provably free from leaks.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
| |
These are intended for new transports. Right now they are not
documented, but that will be addressed soon.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
transport tests
This has been needed for some time; the convey framework is not reliable or debuggable,
and will ultimately be removed. Only the http client test remains using it.
|
| |
|
|
|
|
|
|
|
|
|
| |
This allows us to break the assumption that the bottom half is
TCP, or even an nng_stream, since the DTLS layer will use a totally
different layer. Only nng_stream neeeds to support dial and listen.
Also: UDP: Make the sockaddr arguments to open const.
Also: Align the IPv6 address in the sockaddr (this allows for
efficient 64-bit or even 128-bit operations on these values.)
|
| |
|
|
| |
UBSAN warning
|
| |
|
|
|
|
| |
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 only thing using this was the transport lookups, but as
those transports are now fully initialized in nng_init, we
no longer need to lock that at all.
|
| |
|
|
| |
The CV_INITIALIZER is error prone, as it cannot use cv_until.
|
| | |
|
| |
|
|
|
|
|
|
| |
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 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.
|