diff options
| author | Garrett D'Amore <garrett@damore.org> | 2018-04-30 13:15:41 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2018-04-30 13:34:04 -0700 |
| commit | 264ed002f15645193ad53d4ba51218365d979699 (patch) | |
| tree | c4ed06d8ffd65bbdf9d94f994c96cecb17f56c81 /docs | |
| parent | 2b0d31553e542c130e2595ff9a3ac9756a2c1619 (diff) | |
| download | nng-264ed002f15645193ad53d4ba51218365d979699.tar.gz nng-264ed002f15645193ad53d4ba51218365d979699.tar.bz2 nng-264ed002f15645193ad53d4ba51218365d979699.zip | |
fixes #384 Add NN_PROTOCOL and related
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/man/nn_getsockopt.3compat.adoc | 7 | ||||
| -rw-r--r-- | docs/man/nn_setsockopt.3compat.adoc | 5 | ||||
| -rw-r--r-- | docs/man/nng_compat.3compat.adoc | 6 | ||||
| -rw-r--r-- | docs/man/nng_options.5.adoc | 27 |
4 files changed, 34 insertions, 11 deletions
diff --git a/docs/man/nn_getsockopt.3compat.adoc b/docs/man/nn_getsockopt.3compat.adoc index f4988093..24e13861 100644 --- a/docs/man/nn_getsockopt.3compat.adoc +++ b/docs/man/nn_getsockopt.3compat.adoc @@ -137,11 +137,12 @@ NOTE: Not all protocols offer this protection, so care should still be used in configuring device forwarding. `NN_DOMAIN`:: -This contains either the value `AF_SP` or `AF_SP_RAW`, corresponding -to the value that the socket was created with. +This option of type `int` represents either the value `AF_SP` or `AF_SP_RAW`, +corresponding to the value that the socket was created with. `NN_PROTOCOL`:: -This option is not supported at this time. +This option option of type `int` contains the numeric protocol number +that the socket is used with. `NN_RCVFD`:: This option returns a file descriptor suitable for use in with `poll()` or diff --git a/docs/man/nn_setsockopt.3compat.adoc b/docs/man/nn_setsockopt.3compat.adoc index 076ebec6..7869c832 100644 --- a/docs/man/nn_setsockopt.3compat.adoc +++ b/docs/man/nn_setsockopt.3compat.adoc @@ -130,11 +130,6 @@ This value, if positive, provides some protection against forwarding loops in NOTE: Not all protocols offer this protection, so care should still be used in configuring device forwarding. -// NN_DOMAIN is readonly. -// NN_PROTOCOL is not supported. -// NN_RCVFD is read-only. -// NN_SNDFD is read-only. - The following option is available for `NN_REQ` sockets using the `NN_REQ` level: diff --git a/docs/man/nng_compat.3compat.adoc b/docs/man/nng_compat.3compat.adoc index 9029fb05..f46fc7df 100644 --- a/docs/man/nng_compat.3compat.adoc +++ b/docs/man/nng_compat.3compat.adoc @@ -115,9 +115,9 @@ Consequently, socket numbers can become quite large, and should probably not be used for array indices. NOTE: The following options (`nn_getsockopt`) are unsupported: -`NN_PROTOCOL`, `NN_SNDPRIO`, `NN_RCVPRIO`, `NN_IPV4ONLY`. -Some of these will probably be added back in the future when -the relevant support is added to _nng_. +`NN_IPC_INBUFSZ`, `NN_OUTBUFSZ`, `NN_SNDPRIO`, `NN_RCVPRIO`, `NN_IPV4ONLY`. +Some of these may be supported in the future when the relevant support +is added to _nng_. NOTE: Access to statistics using this legacy API (`<<nn_get_statistic.3compat#,nn_get_statistic()>>`) is unsupported. diff --git a/docs/man/nng_options.5.adoc b/docs/man/nng_options.5.adoc index e6ed1f7b..9db3d660 100644 --- a/docs/man/nng_options.5.adoc +++ b/docs/man/nng_options.5.adoc @@ -21,6 +21,10 @@ nng_options - socket, dialer, listener, and pipe options #define NNG_OPT_SOCKNAME "socket-name" #define NNG_OPT_RAW "raw" +#define NNG_OPT_PROTO "protocol" +#define NNG_OPT_PROTONAME "protocol-name" +#define NNG_OPT_PEER "peer" +#define NNG_OPT_PEERNAME "peer-name" #define NNG_OPT_RECVBUF "recv-buffer" #define NNG_OPT_SENDBUF "send-buffer" #define NNG_OPT_RECVFD "recv-fd" @@ -288,6 +292,29 @@ Accordingly it can only be used with dialers, listeners, and pipes. NOTE: Some transports will canonify URLs before returning them to the application. +[[NNG_OPT_PROTO]] +((`NNG_OPT_PROTO`)):: +(`int`) +This read-only option is used to obtain the 16-bit number for the socket's protocol. + +[[NNG_OPT_PEER]] +((`NNG_OPT_PEER`)):: +(`int`) +This read-only option is used to obtain the 16-bit number of the +peer protocol for the socket. + + +[[NNG_OPT_PROTONAME]] +((`NNG_OPT_PROTONAME`)):: +(string) +This read-only option is used to obtain the name of the socket's protocol. + +[[NNG_OPT_PEERNAME]] +((`NNG_OPT_PEERNAME`)):: +(string) +This read-only option is used to obtain the name of the peer protocol for +the socket. + [[NNG_OPT_TCP_NODELAY]] ((`NNG_OPT_TCP_NODELAY`)):: (`bool``) |
