From 85aff44e00e836eda618d4f1cf013bce38b3fd44 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sun, 17 Nov 2024 18:23:17 -0800 Subject: URL u_port should be a number not a string. 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. --- docs/ref/migrate/nng1.md | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'docs/ref/migrate') diff --git a/docs/ref/migrate/nng1.md b/docs/ref/migrate/nng1.md index d3440fe4..b7ddea33 100644 --- a/docs/ref/migrate/nng1.md +++ b/docs/ref/migrate/nng1.md @@ -160,4 +160,11 @@ A number of the [statistics][statistic] functions take, or return, `const nng_st of plain `nng_stat *`. The ABI has not changed, but it may be necessary to declare certain methods variables `const` to avoid warnings about misuse of `const`. +## Url Structure Members + +The details of [`nng_url`] have changed as follows: + +- `u_port` is no longer a string, but a `uint16_t` +- `u_scheme` is a const char \* + {{#include ../xref.md}} -- cgit v1.2.3-70-g09d2