From 0ea2fdfcab92d273f4db8bd4d24bb2639763155c Mon Sep 17 00:00:00 2001 From: gdamore Date: Tue, 31 Dec 2024 23:21:34 +0000 Subject: deploy: 4a8bb5878cd5fb0aae7dad1877c77ac328f4e756 --- ref/migrate/nanomsg.html | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'ref/migrate/nanomsg.html') diff --git a/ref/migrate/nanomsg.html b/ref/migrate/nanomsg.html index dda27f32..b16a7aa3 100644 --- a/ref/migrate/nanomsg.html +++ b/ref/migrate/nanomsg.html @@ -245,32 +245,32 @@ NNG approach to messages. Likewise there is no struct nn_cmsghdr eq nn_strerrornng_strerror nn_errnoNoneErrors are returned directly rather than through errno. nn_socketVariousUse the appropriate protocol constructor, such as nng_req0_open. -nn_closenng_socket_close -nn_bindnng_listen, nng_listener_createAllocating a listener with nng_lister_create and configuring it offers more capabilities. -nn_connectnng_dial, nng_dialer_createAllocating a dialer with nng_dialer_create and configuring it offers more capabilities. -nn_shutdownnng_lister_close, nng_dialer_close +nn_closenng_socket_close +nn_bindnng_listen, nng_listener_createAllocating a listener with nng_lister_create and configuring it offers more capabilities. +nn_connectnng_dial, nng_dialer_createAllocating a dialer with nng_dialer_create and configuring it offers more capabilities. +nn_shutdownnng_listener_close, nng_dialer_close nn_allocmsgnng_msg_allocThere are significant semantic differences. nn_freemsgnng_msg_free nn_reallocmsgnng_msg_realloc -nn_sendnng_send -nn_recvnng_recv -nn_sendmsgnng_sendmsg -nn_getsockoptnng_socket_getNNG has typed accessors for options, and also separate functions for dialers and listeners. -nn_setsockoptnng_socket_set -nn_devicenng_device +nn_sendnng_send +nn_recvnng_recv +nn_sendmsgnng_sendmsg +nn_getsockoptnng_socket_getNNG has typed accessors for options, and also separate functions for dialers and listeners. +nn_setsockoptnng_socket_set +nn_devicenng_device nn_pollNoneCan be constructed using nng_aio. Few if any applications ever used this API. -nn_termNoneThe nng_fini API can do this, but is not recommended except when debugging memory leaks. -nn_get_statisticnng_stats_getThe statistics in NNG are completely different, with different semantics and no stability guarantees. +nn_termnng_finiThe nng_fini API can do this, but is not recommended except when debugging memory leaks. +nn_get_statisticnng_stats_getThe statistics in NNG are completely different, with different semantics and no stability guarantees. NN_POLLINNoneUsed only with nn_poll. NN_POLLOUTNoneUsed only with nn_poll. -NN_MSGNNG_FLAG_ALLOCSee nng_send and nng_recv for details. +NN_MSGNNG_FLAG_ALLOCSee nng_send and nng_recv for details. NN_CMSG_ALIGNNone NN_CMSG_FIRSTHDRNone NN_CMSG_NXTHDRNone NN_CMSG_DATANone NN_CMSG_LENNone NN_CMSG_SPACENone -struct nn_iovecnng_iov +struct nn_iovecnng_iov struct nn_msghdrnng_msg struct nn_cmsghdrnng_msg and nng_msg_header @@ -279,12 +279,12 @@ NNG approach to messages. Likewise there is no struct nn_cmsghdr eq

The following options are changed.

- - - - - - + + + + + + @@ -293,7 +293,7 @@ NNG approach to messages. Likewise there is no struct nn_cmsghdr eq - +
Nanomsg OptionNNG EqvaivalentNotes
NN_LINGERNoneNNG does not support tuning this.
NN_SNDBUFNNG_OPT_SENDBUFNNG value is given in messages, not bytes.
NN_RCVBUFNNG_OPT_RECVBUFNNG value is given in messages, not bytes.
NN_SNDTIMEONNG_OPT_SENDTIMEO
NN_RCVTIMEONNG_OPT_RECVTIMEO
NN_RECONNECT_IVLNNG_OPT_RECONNMINT
NN_RECONNECT_IVL_MAXNNG_OPT_RECONNMAXT
NN_SNDBUFNNG_OPT_SENDBUFNNG value is given in messages, not bytes.
NN_RCVBUFNNG_OPT_RECVBUFNNG value is given in messages, not bytes.
NN_SNDTIMEONNG_OPT_SENDTIMEO
NN_RCVTIMEONNG_OPT_RECVTIMEO
NN_RECONNECT_IVLNNG_OPT_RECONNMINT
NN_RECONNECT_IVL_MAXNNG_OPT_RECONNMAXT
NN_SNDPRIONoneNot supported in NNG yet.
NN_RCVPRIONoneNot supported in NNG yet.
NN_RCVFDnng_socket_get_recv_poll_fdNo longer an option, use a function call.
NN_PROTOCOLnng_socket_proto_idNo longer an option. See also nng_socket_proto_name.
NN_IPV4ONLYNoneUse URL such as tcp4:// to obtain this functionality.
NN_SOCKET_NAMENoneRemoved from NNG.
NN_MAXTTLNNG_OPT_MAXTTL
NN_MAXTTLNNG_OPT_MAXTTL
NN_SUB_SUBSCRIBEnng_sub0_socket_subscribeNo longer an option, use a function call.
NN_SUB_UNSUBSCRIBEnng_sub0_socket_unsubscribeNo longer an option, use a function call.
@@ -326,7 +326,7 @@ There are some exceptions. Be aware that the numeric values are not the

Local Addresses for Dialing

-

The ability to specify the source address in the UROL,to use when +

The ability to specify the source address in the URL,to use when using nn_dial inside the URL is not present in NNG. The correct way to specify the local address is using the NNG_OPT_LOCADDR option on the dialer before starting to dial.

-- cgit v1.2.3-70-g09d2