summaryrefslogtreecommitdiff
path: root/ref/migrate/nng1.html
diff options
context:
space:
mode:
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