summaryrefslogtreecommitdiff
path: root/ref/migrate/nng1.html
diff options
context:
space:
mode:
authorgdamore <gdamore@users.noreply.github.com>2024-11-03 07:57:54 +0000
committergdamore <gdamore@users.noreply.github.com>2024-11-03 07:57:54 +0000
commite6bd9414990a3d0e5995768e1b8b846eff80a14d (patch)
tree5c89d9bb841b7188ade7a9c55eb116ef5f9c1872 /ref/migrate/nng1.html
parent0a19f7a3102492f715ac70e93432772a37c4959a (diff)
downloadnng-e6bd9414990a3d0e5995768e1b8b846eff80a14d.tar.gz
nng-e6bd9414990a3d0e5995768e1b8b846eff80a14d.tar.bz2
nng-e6bd9414990a3d0e5995768e1b8b846eff80a14d.zip
deploy: 02ec0b55cbee5de4d0fd688ce0ebddf08178dc98
Diffstat (limited to 'ref/migrate/nng1.html')
-rw-r--r--ref/migrate/nng1.html8
1 files changed, 8 insertions, 0 deletions
diff --git a/ref/migrate/nng1.html b/ref/migrate/nng1.html
index e5fd57f7..9ea6163d 100644
--- a/ref/migrate/nng1.html
+++ b/ref/migrate/nng1.html
@@ -293,6 +293,14 @@ options must be set on the endpoint (dialer or listener) using the appropriate
<code>nng_dialer_set</code> or <code>nng_listener_set</code> option. This likely means that it is necessary
to allocate and configure the endpoint before attaching it to the socket. This will
also afford a much more fine-grained level of control over transport options.</p>
+<h2 id="socket-options"><a class="header" href="#socket-options">Socket Options</a></h2>
+<p>The <code>NNG_OPT_PROTO</code>, <code>NNG_OPT_PROTONAME</code>, <code>NNG_OPT_PEER</code>, and <code>NNG_OPT_PEERNAME</code> options
+have been replaced by functions instead of options.
+Use <code>nng_socket_proto_id</code>, <code>nng_socket_peer_id</code>, <code>nng_socket_proto_name</code>, and <code>nng_socket_peer_name</code> 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 <code>uint16_t</code>,
+matching the actual wire protocol values, instead of <code>int</code>.</p>
+<p>The <code>NNG_OPT_RAW</code> option has aso been replaced by a function, <code>nng_socket_raw</code>.</p>
<h2 id="statistics-use-constified-pointers"><a class="header" href="#statistics-use-constified-pointers">Statistics Use Constified Pointers</a></h2>
<p>A number of the statistics functions take, or return, <code>const nng_stat *</code> instead
of plain <code>nng_stat *</code>. The ABI has not changed, but it may be necessary to declare