diff options
| author | Garrett D'Amore <garrett@damore.org> | 2024-11-09 13:06:11 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2024-11-09 13:06:11 -0800 |
| commit | d33db7a05a0c38c6bb0b1efa326c5fe301e01a80 (patch) | |
| tree | 08787190b9149d975bf7763827269a60627614ef /docs/ref/migrate/nng1.md | |
| parent | 1c32463e43c1a7ab2f0f2c7a7b83812aacddf40c (diff) | |
| download | nng-d33db7a05a0c38c6bb0b1efa326c5fe301e01a80.tar.gz nng-d33db7a05a0c38c6bb0b1efa326c5fe301e01a80.tar.bz2 nng-d33db7a05a0c38c6bb0b1efa326c5fe301e01a80.zip | |
Add some cross references in the NNG 1 migration guide.
Diffstat (limited to 'docs/ref/migrate/nng1.md')
| -rw-r--r-- | docs/ref/migrate/nng1.md | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/docs/ref/migrate/nng1.md b/docs/ref/migrate/nng1.md index 4b96725d..c5808f1b 100644 --- a/docs/ref/migrate/nng1.md +++ b/docs/ref/migrate/nng1.md @@ -108,22 +108,24 @@ before bringing them into the socket itself. The `NNG_OPT_PROTO`, `NNG_OPT_PROTONAME`, `NNG_OPT_PEER`, and `NNG_OPT_PEERNAME` options have been replaced by functions instead of options. -Use `nng_socket_proto_id`, `nng_socket_peer_id`, `nng_socket_proto_name`, and `nng_socket_peer_name` instead. +Use [`nng_socket_proto_id`], [`nng_socket_peer_id`], [`nng_socket_proto_name`], and [`nng_socket_peer_name`] instead. Note that the new functions provide a reference to a static string, and thus do not require allocation, and the returned strings should not be freed. Also the IDs are provided as `uint16_t`, matching the actual wire protocol values, instead of `int`. -The `NNG_OPT_RAW` option has aso been replaced by a function, `nng_socket_raw`. +The `NNG_OPT_RAW` option has aso been replaced by a function, [`nng_socket_raw`]. ## Subscriptions The `NNG_OPT_SUB_SUBSCRIBE` and `NNG_OPT_SUB_UNSUBCRIBE` options have been replaced by -the following functions: `nng_sub0_socket_subscribe`, `nng_sub0_socket_unsubscribe`, -`nng_sub0_ctx_subscribe` and `nng_sub0_ctx_unsubscribe`. These functions, like the options +the following functions: [`nng_sub0_socket_subscribe`], [`nng_sub0_socket_unsubscribe`], +[`nng_sub0_ctx_subscribe`] and [`nng_sub0_ctx_unsubscribe`]. These functions, like the options they replace, are only applicable to SUB sockets. ## Statistics Use Constified Pointers -A number of the statistics functions take, or return, `const nng_stat *` instead +A number of the [statistics][statistic] functions take, or return, `const nng_stat *` instead 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`. + +{{#include ../xref.md}} |
