Skip to content

Conversation

shikokuchuo
Copy link
Member

@shikokuchuo shikokuchuo commented Oct 15, 2025

This branch contains the updates to support the NNG v2.0 API.

CI will currently fail as I have not yet updated the bundled versions of mbedtls + NNG.

  • Works with system installations of mbedtls 3.6.5 and NNG v2.0 alpha 6 in /usr/local/lib

Internal changes:

  • New interfaces: nng_close() -> nng_socket_close(), nng_recv_aio() -> nng_socket_recv(), nng_send_aio() -> nng_socket_send()
  • New library initialization nng_init(NULL) is called from package load routine. This allows nng_fini() to be safely called on package unload (previously avoided)
  • Entirely updated http semantics with a http_conn struct instead of request/responses
  • New udp:// transport

Revised behaviour:

  • opt() / opt<-() now no longer support string / uint64 / NULL option types
  • parse_url() now returns a character vector of length 7 rather than 10
  • pipe_notify() must be called before the socket listen / dial events
  • Some error values have been internally updated

Tests have been updated for above behavioural changes and test clean

  • Completely clean local Valgrind runs

TODOs:

  • For opt(), return options on the stream dialer / listener rather than the stream
  • Investigate remaining http TLS test failures (failure to return errorValues when using incorrect client credentials)
  • Update bundled mbedtls to 3.6.5 (+ configure support for DTLS etc.)
  • Update bundled NNG v2 (beta)
  • Update docs for changed behaviour

Support for new features will be implemented in separate PRs that target this one.

FYI @lionel-

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant