aboutsummaryrefslogtreecommitdiff
path: root/include
Commit message (Collapse)AuthorAge
* fixes #2158 Implement support for NNG_OPT_TLS_PEER_CN for WolfSSLGarrett D'Amore2025-10-05
| | | | | | | This also provides an implementation for getting ALT names, although nothing uses that yet. We plan to provide a new certificate API to replace these with a nicer API, as obtaining the full list of certs may be unreasonable.
* adds nng_dialer_start_aio (#2163)Jon Gjengset2025-10-04
| | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* Fix typos across docs, comments, and CMakemochalins2025-06-02
|
* Introduce DTLS transport for NNG.Garrett D'Amore2025-06-01
| | | | | | | | | | | | | 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.
* Add new nng_sockaddr_equal and nng_sockaddr_hash functions.Garrett D'Amore2025-05-26
| | | | | These are intended for new transports. Right now they are not documented, but that will be addressed soon.
* Converted property functions to use nng_err.Garrett D'Amore2025-04-27
|
* nng_device should use nng_errGarrett D'Amore2025-04-27
|
* More nng_err -- this time for dialer and listener allocations.Garrett D'Amore2025-04-27
|
* AIO: Use nng_err for cancellation callback instead of int.Garrett D'Amore2025-04-27
| | | | | | 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.
* TLS: break up the TLS layer a bit to refactor for DTLS.Garrett D'Amore2025-04-27
| | | | | | | | | | | 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.)
* Make pointers to data that is not modified const. (#2117)Søren Holm2025-04-27
| | | | | | 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>
* http docs: documentation conversion for http handlersGarrett D'Amore2025-01-15
| | | | This is not yet fully complete, but it's most of the content.
* pipe: nng_pipe_notify should use nng_errGarrett D'Amore2025-01-14
|
* socketpair: use nng_errGarrett D'Amore2025-01-14
|
* init: use nng_errGarrett D'Amore2025-01-14
|
* aio: more nng_err updatesGarrett D'Amore2025-01-14
|
* api: pipes should use nng_errGarrett D'Amore2025-01-14
|
* http: status is an enumGarrett D'Amore2025-01-12
| | | | | This is slightly less efficient, but it provides for better debugging and type safety.
* api: extend usage of nng_errGarrett D'Amore2025-01-12
| | | | | | 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.
* http: fix mishandling of very long headers or URIs, and mishandling of unicodeGarrett D'Amore2025-01-12
| | | | Also, nng_err is now a distinct type which might be nicer in debuggers.
* http: remove unused nng_http_handler_get_dataGarrett D'Amore2025-01-12
| | | | The data is now passed directly to the handler function.
* http: status and reason fixes (make it match docs)Garrett D'Amore2025-01-12
|
* http: remove public access to req / res structuresGarrett D'Amore2025-01-11
|
* http: drop exclusive tree modeGarrett D'Amore2025-01-10
| | | | | Nothing really needs it -- we kept it in 1.0 to preserve semantics, but there is no requirement for semantic preservation in 2.0.
* http: The big HTTP API refactoring of January 2025.v2.0.0-alpha.3http-client-transGarrett D'Amore2025-01-09
| | | | | | | | | | | | | | | | | | | | | | This represents a major change in the HTTP code base, consisting of a complete revamp of the HTTP API. The changes here are too numerous to mention, but the end result should be a vastly simpler API for both server and client applications. Many needless allocations were removed by providing fixed buffers for various parameters and headers when possible. A few bugs were fixed. Most especially we have fixed some bugs around very large URIs and headers, and we have also addressed conformance bugs to more closely conform to RFCs 9110 and 9112. As part of this work, the APIs for WebSockets changed slightly as well. In particular the properties available for accessing headers have changed. There is still documentation conversion work to do, and additional functionality (such as proper support for chunked transfers), but this is a big step in the right direction.
* nng/args.h: add header guardGarrett D'Amore2025-01-06
|
* http: server callback API simplifiedGarrett D'Amore2025-01-06
| | | | | | | | | | This simplified API lets callbacks obtain the response from the connection objection directly, and does not require the aio to carry it as a parameter. Further, the request and response are both stored inline in the connection, reducing allocations. This is at present only for the server; the client will get a similar set of changes.
* http: changing transaction API to inline req and res structuresGarrett D'Amore2025-01-05
| | | | | This is a step towards simplifying this API and ultimately simplifying the HTTP callback API used for the server side.
* args: Convert nng_opts_parse into a header only library using `nng_args_parse`.Garrett D'Amore2025-01-04
| | | | | | | | 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.
* api: Promote idhash supplemental API to coreGarrett D'Amore2025-01-04
|
* api: remove the supplemental platform.h headerGarrett D'Amore2025-01-04
|
* api: fold TLS supplemental headers into nng.hGarrett D'Amore2025-01-04
|
* api: remove dead NNG_OPT_URL macroGarrett D'Amore2025-01-04
|
* api: remove old protocol headersGarrett D'Amore2025-01-04
|
* zerotier: remove unused zerotier.h transport headerGarrett D'Amore2025-01-04
|
* compat: remove unused leftover libnanomsg compatibility headersGarrett D'Amore2025-01-04
|
* api: rename nng_send_aio and nng_recv_aio to nng_socket_send and nng_socket_recvGarrett D'Amore2025-01-04
| | | | This aligns more closely with the nng_ctx functions.
* api: drop the 64-bit option accessors (no more 64-bit option types)Garrett D'Amore2025-01-03
|
* api: remove unused _uint64 options accessors for contexts and socketsGarrett D'Amore2025-01-01
| | | | Also, clarification and add socket option docs for MAXRECVSZ, RECONNMINT, RECONNMAXT
* api: Remove the NNG_FLAG_ALLOCGarrett D'Amore2025-01-01
| | | | | | | | 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.
* protocols: move content from the protocols to nng.hGarrett D'Amore2025-01-01
| | | | | This should simplify things for developers. Just one header to include in most cases now.
* api: add NNG1_MIGRATION transition assistance macroGarrett D'Amore2024-12-31
|
* socket: rename nng_close to nng_socket_closeGarrett D'Amore2024-12-31
|
* fixes #863 socket activation: for TCP and IPC (POSIX only)Garrett D'Amore2024-12-30
| | | | | | | | | This introduces a new option "NNG_OPT_LISTEN_FD", understood by TCP, TLS, and (on POSIX systems) IPC. This option is used to pass a file descriptor or handle (Windows) that is already listening (ready for ACCEPT to be called). For TCP and TLS, the socket must be of type AF_INET or AF_INET6, and for IPC it must be of type AF_UNIX.
* url: accessor functions missing NNG_DECL tagGarrett D'Amore2024-12-29
|
* fixes #961 surprising pipe event orderGarrett D'Amore2024-12-28
|
* zerotier: removedGarrett D'Amore2024-12-26
| | | | | | | | | | All vestiges of ZeroTier have been removed. Also, as consequence, some binary values have changed (specifically the number of the address family used for NNG_AF_ABSTRACT.) We may create a new ZeroTier transport that makes use of lwIP to provide for ZeroTier and native host network coexistence, without requiring ZeroTier to participate in the native networking stack.
* aio: nng_aio_defer replaced by nng_aio_startGarrett D'Amore2024-12-26
| | | | | This represents an API change, and we remove the nng_aio_begin function as well, introducing the lightweight nng_aio_reset instead.
* aio: introduce NNG_ESTOPPEDGarrett D'Amore2024-12-26
| | | | | | | | | | | 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.
* aio: introduce nni_aio_deferGarrett D'Amore2024-12-22
| | | | | | | | 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.