aboutsummaryrefslogtreecommitdiff
path: root/docs/ref/migrate/nng1.md
Commit message (Collapse)AuthorAge
* 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.
* 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
|
* docs: minor revisions for migration guideGarrett D'Amore2025-01-04
|
* api: remove old protocol 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.
* sha1: move this to private websocket APIGarrett D'Amore2025-01-01
| | | | | | Nothing else uses it, and nothing else *should* use it because SHA1 is insecure. WebSockets have to use it by definition, unfortunately. The implementation is not very fast, but doesn't have to be for the use case of websocket keying.
* api: add NNG1_MIGRATION transition assistance macroGarrett D'Amore2024-12-31
|
* socket: rename nng_close to nng_socket_closeGarrett D'Amore2024-12-31
|
* 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.
* http: limit handler uri to 1KGarrett D'Amore2024-12-22
| | | | | | | | | | | This is just the part of the tree that will be matched when looking up a handler. Requests may come in with very much longer URIs, and be matched to the handler as a "subdirectory". This approach makes it possible to avoid a dynamic allocation on the handler, at the cost of pre-allocating 1KB with the handler object. This size can be overridden using a NNG_HTTP_MAX_URI at compile time.
* http: nng_http_handler_set_data is now void return (API break)Garrett D'Amore2024-12-22
|
* nng_http_server_collect_body now void return (API break)Garrett D'Amore2024-12-22
|
* HTTP: nng_http_handler_set_method no longer failsGarrett D'Amore2024-12-22
|
* HTTP handler: limit host names to 256 bytes (RFC 1035 specifies 253.)Garrett D'Amore2024-12-22
| | | | This also makes `nng_http_handler_set_host` never fail (API break).
* http: setting response status never fails (breaking API change)Garrett D'Amore2024-12-22
|
* http: method on request structure is now staticGarrett D'Amore2024-12-22
| | | | | This saves yet another allocation. It also no longer returns a value making this a breaking change.
* Remove all the get_ptr option accessors.Garrett D'Amore2024-11-24
| | | | | 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.)
* Remove all the set_ptr option functions.Garrett D'Amore2024-11-24
| | | | | This hopefully ensures that we have good typed functions instead of just passing around pointers blithely.
* Remove the NNG_OPT_IPC_SECURITY_DESCRIPTOR option.Garrett D'Amore2024-11-24
| | | | | | | | 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.
* Remove string option functions from sockets and contexts.Garrett D'Amore2024-11-24
| | | | | These are not needed anymore, and the semantics of string accessors is brittle, so we want to eliminate these as much as possible.
* socket: remove unused nng_socket_get_ptr and nng_socket_set_ptr.Garrett D'Amore2024-11-24
| | | | | | | | 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.
* tls: add a mutual authentication testGarrett D'Amore2024-11-23
| | | | | | | | Also, make it clearer that TLS keys and certificates can only be set once on a configuration. (mbedTLS makes this confusing!) This mutual test is only fully validated on mbed, because wolfSSL seems to not properly validate this in many configurations.
* docs: Document removal of NNG_OPT_URL, even though it isn't done yet.Garrett D'Amore2024-11-23
| | | | | We're going to start ripping out support for it. The alternative functions should be used instead.
* Introduce accessors for nng_url struct and make it opaque.Garrett D'Amore2024-11-18
| | | | | This provides safety by ensuring that applications do not depend on the size or layout of nng_url itself.
* URL refactor part 1.Garrett D'Amore2024-11-18
| | | | | | | This eliminates most (but not all) of the dynamic allocations associated with URL objects. A number of convenience fields on the URL are removed, but we are able to use common buffer for most of the details.
* URL u_port should be a number not a string.Garrett D'Amore2024-11-17
| | | | | | | | | | | The idea here is to reduce the dynamic allocations used for URLs, and also the back and forth with parsing begin strings and port numbers. We always resolve to a port number, and this is easier for everyone. The real goal in the long term is to eliminate dynamic allocation of the URL fields altogether, but that requires a little more work. This is a step in the right direction.
* tcp/tls: Remove support for local interface address in dialer URLsGarrett D'Amore2024-11-17
| | | | | This was an undocumented capability provided for libnanomsg. The correct way to obtain the same functionality is to use `NNG_OPT_LOCADDR`.
* remove NNG_OPT_SOCKNAME (and socket names altogether)Garrett D'Amore2024-11-17
| | | | | | | | This functionality was provided principally for libnanomsg compatibility. This saves some memory and eliminates some pointless functionality. While here, updated the socket options documentation to remove references to options already removed.
* tls: remove support for TLS 1.0 and 1.1.Garrett D'Amore2024-11-16
| | | | | Those old algorithms are not used anywhere, and are not recommended. TLS 1.2 support has been prevalent for over a decade.
* Migration update referencing nng_init (but note not documented yet.)Garrett D'Amore2024-11-11
|
* TLS configuration changed to use discret _set_tls and _get_tls functions.Garrett D'Amore2024-11-09
| | | | This is simpler, and more reliable than using socket options.
* fixes #1907 Document the nng_socket_get_send_poll_fd and recv_poll_fdGarrett D'Amore2024-11-09
|
* Add some cross references in the NNG 1 migration guide.Garrett D'Amore2024-11-09
|
* Socket option handling clean ups for endpoints.Garrett D'Amore2024-11-03
| | | | | | | The framework for saving and replaying socket options was left over, and should not be used. But we do need to send the initial socket options to endpoints when creating them, so we have support for that in a cleaner fashion that does not require memory allocations.
* Remove untyped nng_socket_get and nng_socket_set.Garrett D'Amore2024-11-03
|
* Remove untyped nng_dialer_get/set and nng_listener_get/set.Garrett D'Amore2024-11-03
|
* Remove nng_ctx untyped option functionsGarrett D'Amore2024-11-03
|
* Remove untyped stream option functions.Garrett D'Amore2024-11-03
| | | | | The underlying stream APIs have no need for untyped accessors. Another step on the road to removal of NNI_TYPE_OPAQUE.
* Replace NNG_OPT_SUB_SUBSCRIBE/UNSUBSCRIBE with functions.Garrett D'Amore2024-11-03
| | | | | The main purpose is to eliminate the NNI_TYPE_OPAQUE options, by putting these into their own first class, protocol-specific, functions.
* Replace `NNG_OPT_RAW` with `nng_socket_raw`.Garrett D'Amore2024-11-02
| | | | Similar to the other identities, this simplifies code a bit.
* Replace `NNG_OPT_PROTO`, `NNG_OPT_PROTONAME`, and friends with functions.Garrett D'Amore2024-11-02
| | | | | | 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.
* Remove nng_stream_set function family.Garrett D'Amore2024-10-28
| | | | This was not really used or useful.