summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2018-04-04 12:37:34 -0700
committerGarrett D'Amore <garrett@damore.org>2018-04-04 13:13:24 -0700
commit45f455064b5704f3d5ed8ecf9f197a18fe72ee59 (patch)
tree76a626029f3a5a818b113b7e4342efaf6220a03f /docs
parent505a9bce029e51540739c853a6c9eef0ecfb2e90 (diff)
downloadnng-45f455064b5704f3d5ed8ecf9f197a18fe72ee59.tar.gz
nng-45f455064b5704f3d5ed8ecf9f197a18fe72ee59.tar.bz2
nng-45f455064b5704f3d5ed8ecf9f197a18fe72ee59.zip
fixes #331 replace NNG_OPT_RAW option with constructor
This makes the raw mode something that is immutable, determined at socket construction. This is an enabling change for the separate context support coming soon. As a result, this is an API breaking change for users of the raw mode option (NNG_OPT_RAW). There aren't many of them out there. Cooked mode is entirely unaffected. There are changes to tests and documentation included.
Diffstat (limited to 'docs')
-rw-r--r--docs/man/nng.7.adoc83
-rw-r--r--docs/man/nng_bus.7.adoc4
-rw-r--r--docs/man/nng_bus_open.3.adoc8
-rw-r--r--docs/man/nng_device.3.adoc18
-rw-r--r--docs/man/nng_options.5.adoc3
-rw-r--r--docs/man/nng_pair.7.adoc11
-rw-r--r--docs/man/nng_pair_open.3.adoc9
-rw-r--r--docs/man/nng_pub.7.adoc4
-rw-r--r--docs/man/nng_pub_open.3.adoc8
-rw-r--r--docs/man/nng_pull.7.adoc8
-rw-r--r--docs/man/nng_pull_open.3.adoc8
-rw-r--r--docs/man/nng_push.7.adoc6
-rw-r--r--docs/man/nng_push_open.3.adoc8
-rw-r--r--docs/man/nng_rep.7.adoc7
-rw-r--r--docs/man/nng_rep_open.3.adoc6
-rw-r--r--docs/man/nng_req.7.adoc11
-rw-r--r--docs/man/nng_req_open.3.adoc10
-rw-r--r--docs/man/nng_respondent.7.adoc4
-rw-r--r--docs/man/nng_respondent_open.3.adoc9
-rw-r--r--docs/man/nng_sockaddr_in6.5.adoc1
-rw-r--r--docs/man/nng_sub.7.adoc4
-rw-r--r--docs/man/nng_sub_open.3.adoc8
-rw-r--r--docs/man/nng_surveyor.7.adoc7
-rw-r--r--docs/man/nng_surveyor_open.3.adoc8
24 files changed, 164 insertions, 89 deletions
diff --git a/docs/man/nng.7.adoc b/docs/man/nng.7.adoc
index ee120774..507ddeec 100644
--- a/docs/man/nng.7.adoc
+++ b/docs/man/nng.7.adoc
@@ -73,46 +73,73 @@ other languages please check the http://nanomsg.org/[website].
== Conceptual Overview
-_nng_ presents a _socket_ view of networking. The sockets are constructed
-using protocol-specific functions, as a given socket implements precisely
-one _nng_ protocol.
+_nng_ presents a _socket_ view of networking.
+The sockets are constructed using protocol-specific functions, as a given
+socket implements precisely one _nng_ protocol.
Each socket can be used to send and receive messages (if the protocol)
-supports it, and implements the appropriate protocol semantics. For
-example, <<nng_sub.7#,nng_sub(7)>> sockets automatically filter incoming
+supports it, and implements the appropriate protocol semantics.
+For example, <<nng_sub.7#,_sub_>> sockets automatically filter incoming
messages to discard those for topics that have not been subscribed.
_nng_ sockets are message oriented, so that messages are either delivered
-wholly, or not at all. Partial delivery is not possible. Furthermore,
-_nng_ does not provide any other delivery or ordering guarantees;
-messages may be dropped or reordered. (Some protocols, such as
-<<nng_req.7#,nng_req(7)>> may offer stronger guarantees by
-performing their own retry and validation schemes.)
+wholly, or not at all. Partial delivery is not possible.
+Furthermore, _nng_ does not provide any other delivery or ordering guarantees;
+messages may be dropped or reordered
+(Some protocols, such as <<nng_req.7#,_req_>> may offer stronger
+guarantees by performing their own retry and validation schemes.)
Each socket can have zero, one, or many "endpoints", which are either
-_listeners_ or _dialers_. (A given socket may freely choose whether it uses
-listeners, dialers, or both.) These "endpoints" provide access to
-underlying transports, such as TCP, etc.
-
-Each endpoint is associated with a URL, which is a service address. For
-dialers, this will be the service address that will be contacted, whereas
-for listeners this is where the listener will bind and watch for new
-connections.
-
-Endpoints do not themselves transport data. They are instead responsible
-for the creation of _pipes_, which can be thought of as message-oriented,
-connected, streams. Pipes frequently correspond to a single underlying
-byte stream -- for example both IPC and TCP transports implement their
-pipes using a 1:1 relationship with a connected socket.
-
-Endpoints create pipes as needed. Listeners will create them when a new
-client connection request arrives, and dialers will generally create one,
-then wait for it to disconnect before reconnecting.
+_listeners_ or _dialers_.
+(A given socket may freely choose whether it uses listeners, dialers, or both.)
+These "endpoints" provide access to underlying transports, such as TCP, etc.
+
+Each endpoint is associated with a URL, which is a service address.
+For dialers, this will be the service address that will be contacted, whereas
+for listeners this is where the listener will accept new connections.
+
+Endpoints do not themselves transport data.
+They are instead responsible for the creation of _pipes_, which can be
+thought of as message-oriented connected streams.
+Pipes frequently correspond to a single underlying byte stream.
+For example both IPC and TCP transports implement their
+pipes using a 1:1 relationship with a connected operating system socket.
+
+Endpoints create pipes as needed.
+Listeners will create them when a new client connection request arrives,
+and dialers will generally create one, then wait for it to disconnect before
+reconnecting.
Most applications should not have to worry about endpoints or pipes at
all; the socket abstraction should provide all the functionality needed
other than in a few specific circumstances.
+[[raw_mode]](((raw mode)))
+=== Raw Mode
+
+(((cooked mode)))
+Most applications will use _nng_ sockets in "`cooked`" mode.
+This mode provides the full semantics of the protocol.
+For example, <<nng_req.7#,_req_>> sockets will automatically
+match a reply to a request, and resend requests periodically if no reply
+was received.
+
+There are situations, such as with <<nng_device.7#,proxies>>,
+where it is desirable to bypass these semantics and simply pass messages
+to and from the socket with no extra semantic handling.
+This is possible using "`raw`" mode sockets.
+
+Raw mode sockets are generally constructed with a different function,
+such as <<nng_req_open.3#,`nng_req0_open_raw()`>>.
+Using these sockets, the application can simply send and receive messages,
+and is responsible for supplying any additional socket semantics.
+Typically this means that the application will need to inspect message
+headers on incoming messages, and supply them on outgoing messages.
+
+TIP: The <<nng_device.3#,`nng_device()`>> function only works with raw mode
+sockets, but as it only forwards the messages, no additional application
+processing is needed.
+
=== URLs
(((URL)))
diff --git a/docs/man/nng_bus.7.adoc b/docs/man/nng_bus.7.adoc
index a05a9d04..d5c57710 100644
--- a/docs/man/nng_bus.7.adoc
+++ b/docs/man/nng_bus.7.adoc
@@ -18,8 +18,6 @@ nng_bus - bus protocol
[source,c]
----
#include <nng/protocol/bus0/bus.h>
-
-int nng_bus0_open(nng_socket *s);
----
== DESCRIPTION
@@ -51,7 +49,7 @@ the more likely that message loss is to occur.
=== Socket Operations
-The <<nng_bus_open.3#,`nng_bus0_open()`>> call creates a bus socket.
+The <<nng_bus_open.3#,`nng_bus0_open()`>> functions create a bus socket.
This socket may be used to send and receive messages.
Sending messages will attempt to deliver to each directly connected peer.
diff --git a/docs/man/nng_bus_open.3.adoc b/docs/man/nng_bus_open.3.adoc
index 119dc4e3..50369c07 100644
--- a/docs/man/nng_bus_open.3.adoc
+++ b/docs/man/nng_bus_open.3.adoc
@@ -21,6 +21,8 @@ nng_bus_open - create bus socket
#include <nng/protocol/bus0/bus.h>
int nng_bus0_open(nng_socket *s);
+
+int nng_bus0_open_raw(nng_socket *s);
----
== DESCRIPTION
@@ -28,9 +30,13 @@ int nng_bus0_open(nng_socket *s);
The `nng_bus0_open()` function creates a <<nng_bus.7#,_bus_>> version 0
<<nng_socket.5#,socket>> and returns it at the location pointed to by _s_.
+The `nng_bus0_open_raw()` function creates a <<nng_bus.7#,_bus_>> version 0
+<<nng_socket.5#,socket>> in
+<<nng.7#raw_mode,raw>> mode, and returns it at the location pointed to by _s_.
+
== RETURN VALUES
-This function returns 0 on success, and non-zero otherwise.
+These functions return 0 on success, and non-zero otherwise.
== ERRORS
diff --git a/docs/man/nng_device.3.adoc b/docs/man/nng_device.3.adoc
index 80780884..09717e21 100644
--- a/docs/man/nng_device.3.adoc
+++ b/docs/man/nng_device.3.adoc
@@ -31,6 +31,11 @@ This function is used to create forwarders, which can be used to create
complex network topologies to provide for improved ((horizontal scalability)),
reliability, and isolation.
+Only <<nng_options.5#NNG_OPT_RAW,raw>> mode sockets may be used with this
+function.
+These can be created using `_raw` forms of the various socket constructors,
+such as <<nng_req_open.3#,`nng_req0_open_raw()`>>.
+
The `nng_device()` function does not return until one of the sockets
is closed.
@@ -60,11 +65,14 @@ be a _bus_ socket.
=== Operation
-This `nng_device()` function puts each socket into raw mode
-(see <<nng_options.5#NNG_OPT_RAW,`NNG_OPT_RAW`>>), and then moves messages
-between them.
-When a protocol has a ((backtrace)) style header, routing information is
-added as the message crosses the forwarder, allowing replies to be
+The `nng_device()` function moves messages between the provided sockets.
+
+When a protocol has a ((backtrace)) style header, routing information
+is present in the header of received messages, and is copied to the
+header of the output bound message.
+The underlying raw mode protocols supply the necessary header
+adjustments to add or remove routing headers as needed.
+This allows replies to be
returned to requestors, and responses to be routed back to surveyors.
Additionally, some protocols have a maximum ((time-to-live)) to protect
diff --git a/docs/man/nng_options.5.adoc b/docs/man/nng_options.5.adoc
index f07194d1..b5b62815 100644
--- a/docs/man/nng_options.5.adoc
+++ b/docs/man/nng_options.5.adoc
@@ -99,7 +99,7 @@ listeners but not dialers.
(((raw mode)))
(((cooked mode)))
(`bool`)
-This option determines whether the socket is in "`raw`" mode.
+This read-only option indicates whether the socket is in "`raw`" mode.
If `true`, the socket is in "`raw`" mode, and if `false` the socket is
in "`cooked`" mode.
Raw mode sockets generally do not have any protocol-specific semantics applied
@@ -107,6 +107,7 @@ to them; instead the application is expected to perform such semantics itself.
(For example, in "`cooked`" mode a <<nng_rep.7#,_rep_>> socket would
automatically copy message headers from a received message to the corresponding
reply, whereas in "`raw`" mode this is not done.)
+See <<nng.7#raw_mode,Raw Mode>> for more details.
[[NNG_OPT_RECONNMINT]]
((`NNG_OPT_RECONNMINT`))::
diff --git a/docs/man/nng_pair.7.adoc b/docs/man/nng_pair.7.adoc
index f0824555..f03a4a5f 100644
--- a/docs/man/nng_pair.7.adoc
+++ b/docs/man/nng_pair.7.adoc
@@ -19,16 +19,12 @@ nng_pair - pair protocol
[source,c]
----
#include <nng/protocol/pair0/pair.h>
-
-int nng_pair0_open(nng_socket *s);
----
.Version 1
[source,c]
----
#include <nng/protocol/pair1/pair.h>
-
-int nng_pair1_open(nng_socket *s);
----
== DESCRIPTION
@@ -43,9 +39,10 @@ some additional sophistication in the application.
=== Socket Operations
-The `nng_pair_open()` call creates a _pair_ socket. Normally, this
-pattern will block when attempting to send a message, if no peer is
-able to receive the message.
+The <<nng_pair_open.3#,`nng_pair_open()`>> functions create _pair_ socket.
+
+Normally, this pattern will block when attempting to send a message if
+no peer is able to receive the message.
NOTE: Even though this mode may appear to be "reliable", because back-pressure
prevents discarding messages most of the time, there are topologies involving
diff --git a/docs/man/nng_pair_open.3.adoc b/docs/man/nng_pair_open.3.adoc
index 35bda5e5..054c3ffc 100644
--- a/docs/man/nng_pair_open.3.adoc
+++ b/docs/man/nng_pair_open.3.adoc
@@ -21,6 +21,8 @@ nng_pair_open - create pair socket
#include <nng/protocol/pair0/pair.h>
int nng_pair0_open(nng_socket *s);
+
+int nng_pair0_open_raw(nng_socket *s);
----
.Version 1
@@ -29,6 +31,8 @@ int nng_pair0_open(nng_socket *s);
#include <nng/protocol/pair1/pair.h>
int nng_pair1_open(nng_socket *s);
+
+int nng_pair1_open_raw(nng_socket *s);
----
== DESCRIPTION
@@ -37,6 +41,11 @@ The `nng_pair0_open()` and `nng_pair1_open()` functions
create a <<nng_pair.7#,_pair_>> version 0 or version 1
<<nng_socket.5#,socket>> and return it at the location pointed to by _s_.
+The `nng_pair0_open_raw()` and `nng_pair1_open_raw()` functions
+create a <<nng_pair.7#,_pair_>> version 0 or version 1
+<<nng_socket.5#,socket>> in
+<<nng.7#raw_mode,raw>> mode and return it at the location pointed to by _s_.
+
== RETURN VALUES
These functions returns 0 on success, and non-zero otherwise.
diff --git a/docs/man/nng_pub.7.adoc b/docs/man/nng_pub.7.adoc
index 6f88115c..e45201b7 100644
--- a/docs/man/nng_pub.7.adoc
+++ b/docs/man/nng_pub.7.adoc
@@ -18,8 +18,6 @@ nng_pub - publisher protocol
[source,c]
----
#include <nng/protocol/pubsub0/pub.h>
-
-int nng_pub0_open(nng_socket *s);
----
== DESCRIPTION
@@ -46,7 +44,7 @@ Applications should construct their messages accordingly.
=== Socket Operations
-The <<nng_pub_open.3#,`nng_pub0_open()`>> call creates a publisher socket.
+The <<nng_pub_open.3#,`nng_pub0_open()`>> functions create a publisher socket.
This socket may be used to send messages, but is unable to receive them.
Attempts to receive messages will result in `NNG_ENOTSUP`.
diff --git a/docs/man/nng_pub_open.3.adoc b/docs/man/nng_pub_open.3.adoc
index ad46c740..32655b1d 100644
--- a/docs/man/nng_pub_open.3.adoc
+++ b/docs/man/nng_pub_open.3.adoc
@@ -21,6 +21,8 @@ nng_pub_open - create pub socket
#include <nng/protocol/pubsub0/pub.h>
int nng_pub0_open(nng_socket *s);
+
+int nng_pub0_open_raw(nng_socket *s);
----
== DESCRIPTION
@@ -28,9 +30,13 @@ int nng_pub0_open(nng_socket *s);
The `nng_pub0_open()` function creates a <<nng_pub.7#,_pub_>> version 0
<<nng_socket.5#,socket>> and returns it at the location pointed to by _s_.
+The `nng_pub0_open_raw()` function creates a <<nng_pub.7#,_pub_>> version 0
+<<nng_socket.5#,socket>> in
+<<nng.7#raw_mode,raw>> mode and returns it at the location pointed to by _s_.
+
== RETURN VALUES
-This function returns 0 on success, and non-zero otherwise.
+These functions return 0 on success, and non-zero otherwise.
== ERRORS
diff --git a/docs/man/nng_pull.7.adoc b/docs/man/nng_pull.7.adoc
index 9cc17bca..c57515c5 100644
--- a/docs/man/nng_pull.7.adoc
+++ b/docs/man/nng_pull.7.adoc
@@ -16,11 +16,9 @@ nng_pull - pull protocol
== SYNOPSIS
[source,c]
-----------
+----
#include <nng/protocol/pipeline0/pull.h>
-
-int nng_pull0_open(nng_socket *s);
-----------
+----
== DESCRIPTION
@@ -37,7 +35,7 @@ This property makes this pattern useful in ((load-balancing)) scenarios.
=== Socket Operations
-The <<nng_pull_open.3#,`nng_pull0_open()`>> call creates a puller socket.
+The <<nng_pull_open.3#,`nng_pull0_open()`>> functions create a puller socket.
This socket may be used to receive messages, but is unable to send them.
Attempts to send messages will result in `NNG_ENOTSUP`.
diff --git a/docs/man/nng_pull_open.3.adoc b/docs/man/nng_pull_open.3.adoc
index 8b4b2389..1fd7eac4 100644
--- a/docs/man/nng_pull_open.3.adoc
+++ b/docs/man/nng_pull_open.3.adoc
@@ -21,6 +21,8 @@ nng_pull_open - create pull socket
#include <nng/protocol/pipeline0/pull.h>
int nng_pull0_open(nng_socket *s);
+
+int nng_pull0_open_raw(nng_socket *s);
----
== DESCRIPTION
@@ -28,9 +30,13 @@ int nng_pull0_open(nng_socket *s);
The `nng_pull0_open()` function creates a <<nng_pull.7#,_pull_>> version 0
<<nng_socket.5#,socket>> and returns it at the location pointed to by _s_.
+The `nng_pull0_open_raw()` function creates a <<nng_pull.7#,_pull_>> version 0
+<<nng_socket.5#,socket>> in
+<<nng.7#raw_mode,raw>> mode and returns it at the location pointed to by _s_.
+
== RETURN VALUES
-This function returns 0 on success, and non-zero otherwise.
+These functions return 0 on success, and non-zero otherwise.
== ERRORS
diff --git a/docs/man/nng_push.7.adoc b/docs/man/nng_push.7.adoc
index 27ddd925..e2ab50ab 100644
--- a/docs/man/nng_push.7.adoc
+++ b/docs/man/nng_push.7.adoc
@@ -16,11 +16,9 @@ nng_push - push protocol
== SYNOPSIS
[source,c]
-----------
+----
#include <nng/protocol/pipeline0/push.h>
-
-int nng_push0_open(nng_socket *s);
-----------
+----
== DESCRIPTION
diff --git a/docs/man/nng_push_open.3.adoc b/docs/man/nng_push_open.3.adoc
index 8470b632..1769b2f2 100644
--- a/docs/man/nng_push_open.3.adoc
+++ b/docs/man/nng_push_open.3.adoc
@@ -21,6 +21,8 @@ nng_push_open - create push socket
#include <nng/protocol/pipeline0/push.h>
int nng_push0_open(nng_socket *s);
+
+int nng_push0_open_raw(nng_socket *s);
----
== DESCRIPTION
@@ -28,9 +30,13 @@ int nng_push0_open(nng_socket *s);
The `nng_push0_open()` function creates a <<nng_push.7#,_push_>> version 0
<<nng_socket.5#,socket>> and returns it at the location pointed to by _s_.
+The `nng_push0_open_raw()` function creates a <<nng_push.7#,_push_>> version 0
+<<nng_socket.5#,socket>> in
+<<nng.7#raw_mode,raw>> mode and returns it at the location pointed to by _s_.
+
== RETURN VALUES
-This function returns 0 on success, and non-zero otherwise.
+These functions return 0 on success, and non-zero otherwise.
== ERRORS
diff --git a/docs/man/nng_rep.7.adoc b/docs/man/nng_rep.7.adoc
index 7b3635c4..255a8f4b 100644
--- a/docs/man/nng_rep.7.adoc
+++ b/docs/man/nng_rep.7.adoc
@@ -18,8 +18,6 @@ nng_rep - reply protocol
[source,c]
----
#include <nng/protocol/reqrep0/rep.h>
-
-int nng_rep0_open(nng_socket *s);
----
== DESCRIPTION
@@ -40,7 +38,7 @@ The _rep_ protocol is the replier side, and the
=== Socket Operations
-The <<nng_rep_open.3#,`nng_rep0_open()`>> call creates a replier socket.
+The <<nng_rep_open.3#,`nng_rep0_open()`>> functions create a replier socket.
This socket may be used to receive messages (requests), and then to send
replies.
Generally a reply can only be sent after receiving a request.
@@ -50,8 +48,7 @@ is no outstanding request.)
Attempts to send on a socket with no outstanding requests will result
in `NNG_ESTATE`.
-Raw mode sockets (set with <<nng_options.5#NNG_OPT_RAW,`NNG_OPT_RAW`>>)
-ignore all these restrictions.
+<<nng.7#raw_mode,Raw>> mode sockets ignore all these restrictions.
=== Protocol Versions
diff --git a/docs/man/nng_rep_open.3.adoc b/docs/man/nng_rep_open.3.adoc
index 4be697bb..f90cefe2 100644
--- a/docs/man/nng_rep_open.3.adoc
+++ b/docs/man/nng_rep_open.3.adoc
@@ -28,9 +28,13 @@ int nng_rep0_open(nng_socket *s);
The `nng_rep0_open()` function creates a <<nng_rep.7#,_rep_>> version 0
<<nng_socket.5#,socket>> and returns it at the location pointed to by _s_.
+The `nng_rep0_open_raw()` function creates a <<nng_rep.7#,_rep_>> version 0
+<<nng_socket.5#,socket>>
+in <<nng.7#,raw>> mode and returns it at the location pointed to by _s_.
+
== RETURN VALUES
-This function returns 0 on success, and non-zero otherwise.
+These functions return 0 on success, and non-zero otherwise.
== ERRORS
diff --git a/docs/man/nng_req.7.adoc b/docs/man/nng_req.7.adoc
index 9d93eade..9b956172 100644
--- a/docs/man/nng_req.7.adoc
+++ b/docs/man/nng_req.7.adoc
@@ -16,11 +16,9 @@ nng_req - request protocol
== SYNOPSIS
[source,c]
-----------
+----
#include <nng/protocol/reqrep0/req.h>
-
-int nng_req0_open(nng_socket *s);
-----------
+----
== DESCRIPTION
@@ -54,7 +52,7 @@ The _req_ protocol is the requester side, and the
=== Socket Operations
-The <<nng_req_open.3#,`nng_req0_open()`>> call creates a requester socket.
+The <<nng_req_open.3#,`nng_req0_open()`>> functions create a requester socket.
This socket may be used to send messages (requests),
and then to receive replies.
Generally a reply can only be received after sending a request.
@@ -70,8 +68,7 @@ that has already been placed on the wire.
Attempts to receive on a socket with no outstanding requests will result
in `NNG_ESTATE`.
-Raw mode sockets (set with <<nng_options.5#NNG_OPT_RAW,`NNG_OPT_RAW`>>)
-ignore all these restrictions.
+<<nng.7#raw_mode,Raw>> mode sockets ignore all these restrictions.
=== Protocol Versions
diff --git a/docs/man/nng_req_open.3.adoc b/docs/man/nng_req_open.3.adoc
index 638ef43a..dd2e7cb6 100644
--- a/docs/man/nng_req_open.3.adoc
+++ b/docs/man/nng_req_open.3.adoc
@@ -21,6 +21,8 @@ nng_req_open - create rep socket
#include <nng/protocol/reqrep0/req.h>
int nng_req0_open(nng_socket *s);
+
+int nng_req0_open_raw(nng_socket *s);
----
== DESCRIPTION
@@ -28,9 +30,14 @@ int nng_req0_open(nng_socket *s);
The `nng_req0_open()` function creates a <<nng_req.7#,_req_>> version 0
<<nng_socket.5#,socket>> and returns it at the location pointed to by _s_.
+The `nng_req0_open_raw()` function creates a <<nng_req.7#,_req_>> version 0
+<<nng_socket.5#,socket>> in
+<<nng.7#raw_mode,raw>> mode
+and returns it at the location pointed to by _s_.
+
== RETURN VALUES
-This function returns 0 on success, and non-zero otherwise.
+These functions return 0 on success, and non-zero otherwise.
== ERRORS
@@ -39,6 +46,7 @@ This function returns 0 on success, and non-zero otherwise.
== SEE ALSO
+<<nng_options.5#,nng_options(5)>>,
<<nng_socket.5#,nng_socket(5)>>,
<<nng_rep.7#,nng_rep(7)>>,
<<nng_req.7#,nng_req(7)>>,
diff --git a/docs/man/nng_respondent.7.adoc b/docs/man/nng_respondent.7.adoc
index 1235941a..2db78866 100644
--- a/docs/man/nng_respondent.7.adoc
+++ b/docs/man/nng_respondent.7.adoc
@@ -18,8 +18,6 @@ nng_respondent - respondent protocol
[source,c]
----------
#include <nng/protocol/survey0/respond.h>
-
-int nng_respondent0_open(nng_socket *s);
----------
== DESCRIPTION
@@ -41,7 +39,7 @@ The _respondent_ protocol is the respondent side, and the
=== Socket Operations
-The <<nng_respondent_open.3#,`nng_respondent0_open()`>> call creates a
+The <<nng_respondent_open.3#,`nng_respondent0_open()`>> functions create a
respondent socket.
This socket may be used to receive messages, and then to send replies.
A reply can only be sent after receiving a survey, and generally the
diff --git a/docs/man/nng_respondent_open.3.adoc b/docs/man/nng_respondent_open.3.adoc
index a62fc9d8..33e9904f 100644
--- a/docs/man/nng_respondent_open.3.adoc
+++ b/docs/man/nng_respondent_open.3.adoc
@@ -21,6 +21,8 @@ nng_respondent_open - create respondent socket
#include <nng/protocol/survey0/respond.h>
int nng_respondent0_open(nng_socket *s);
+
+int nng_respondent0_open_raw(nng_socket *s);
----
== DESCRIPTION
@@ -30,9 +32,14 @@ The `nng_respondent0_open()` function creates a
version 0 <<nng_socket.5#,socket>> and returns it at the location
pointed to by _s_.
+The `nng_respondent0_open_raw()` function creates a
+<<nng_respondent.7#,_respondent_>>
+version 0 <<nng_socket.5#,socket>> in
+<<nng.7#raw_mode,raw>> mode and returns it at the location pointed to by _s_.
+
== RETURN VALUES
-This function returns 0 on success, and non-zero otherwise.
+These functions return 0 on success, and non-zero otherwise.
== ERRORS
diff --git a/docs/man/nng_sockaddr_in6.5.adoc b/docs/man/nng_sockaddr_in6.5.adoc
index f4164dd1..95e6ec8c 100644
--- a/docs/man/nng_sockaddr_in6.5.adoc
+++ b/docs/man/nng_sockaddr_in6.5.adoc
@@ -28,7 +28,6 @@ typedef struct {
uint16_t sa_port;
uint8_t sa_addr[16];
} nng_sockaddr_in6;
-
----
== DESCRIPTION
diff --git a/docs/man/nng_sub.7.adoc b/docs/man/nng_sub.7.adoc
index f222327d..18606f2b 100644
--- a/docs/man/nng_sub.7.adoc
+++ b/docs/man/nng_sub.7.adoc
@@ -19,8 +19,6 @@ nng_sub - subscriber protocol
----
#include <nng/nng.h>
#include <nng/protocol/pubsub0/sub.h>
-
-int nng_sub0_open(nng_socket *s);
----
== DESCRIPTION
@@ -45,7 +43,7 @@ Applications should construct their messages accordingly.
=== Socket Operations
-The <<nng_sub_open.3#,`nng_sub0_open()`>> call creates a subscriber socket.
+The <<nng_sub_open.3#,`nng_sub0_open()`>> functions create a subscriber socket.
This socket may be used to receive messages, but is unable to send them.
Attempts to send messages will result in `NNG_ENOTSUP`.
diff --git a/docs/man/nng_sub_open.3.adoc b/docs/man/nng_sub_open.3.adoc
index bfc315bb..0e7263dd 100644
--- a/docs/man/nng_sub_open.3.adoc
+++ b/docs/man/nng_sub_open.3.adoc
@@ -21,6 +21,8 @@ nng_sub_open - create sub socket
#include <nng/protocol/pubsub0/sub.h>
int nng_sub0_open(nng_socket *s);
+
+int nng_sub0_open_raw(nng_socket *s);
----
== DESCRIPTION
@@ -28,9 +30,13 @@ int nng_sub0_open(nng_socket *s);
The `nng_sub0_open()` function creates a <<nng_sub.7#,_sub_>> version 0
<<nng_socket.5#,socket>> and returns it at the location pointed to by _s_.
+The `nng_sub0_open()` function creates a <<nng_sub.7#,_sub_>> version 0
+<<nng_socket.5#,socket>> in
+<<nng.7#raw_mode,raw>> mode and returns it at the location pointed to by _s_.
+
== RETURN VALUES
-This function returns 0 on success, and non-zero otherwise.
+These functions return 0 on success, and non-zero otherwise.
== ERRORS
diff --git a/docs/man/nng_surveyor.7.adoc b/docs/man/nng_surveyor.7.adoc
index 2c53e3ab..97578b33 100644
--- a/docs/man/nng_surveyor.7.adoc
+++ b/docs/man/nng_surveyor.7.adoc
@@ -19,8 +19,6 @@ nng_surveyor - surveyor protocol
----
#include <nng/nng.h>
#include <nng/protocol/survey0/survey.h>
-
-int nng_surveyor0_open(nng_socket *s);
----
== DESCRIPTION
@@ -43,7 +41,7 @@ The _surveyor_ protocol is the surveyor side, and the
=== Socket Operations
The <<nng_surveyor_open.3#,`nng_surveyor0_open()`>>
-call creates a surveyor socket.
+functions create a surveyor socket.
This socket may be used to send messages (surveys), and then to receive replies.
A reply can only be received after sending a survey.
A surveyor can normally expect to receive at most one reply from each responder.
@@ -59,8 +57,7 @@ Only one survey can be outstanding at a time; sending another survey will
cancel the prior one, and any responses from respondents from the prior
survey that arrive after this will be discarded.
-Raw mode sockets (set with <<nng_options.5#NNG_OPT_RAW,`NNG_OPT_RAW`>>)
-ignore all these restrictions.
+<<nng.7#raw_mode,Raw>> mode sockets ignore all these restrictions.
=== Protocol Versions
diff --git a/docs/man/nng_surveyor_open.3.adoc b/docs/man/nng_surveyor_open.3.adoc
index 17be9889..0ca95d90 100644
--- a/docs/man/nng_surveyor_open.3.adoc
+++ b/docs/man/nng_surveyor_open.3.adoc
@@ -21,6 +21,8 @@ nng_surveyor_open - create surveyor socket
#include <nng/protocol/survey0/survey.h>
int nng_surveyor0_open(nng_socket *s);
+
+int nng_surveyor0_open_raw(nng_socket *s);
----
== DESCRIPTION
@@ -29,9 +31,13 @@ The `nng_surveyor0_open()` function creates a <<nng_surveyor.7#,_surveyor_>>
version 0 <<nng_socket.5#,socket>> and returns it at the location
pointed to by _s_.
+The `nng_surveyor0_open_raw()` function creates a <<nng_surveyor.7#,_surveyor_>>
+version 0 <<nng_socket.5#,socket>> in
+<<nng.7#raw_mode,raw>> mode and returns it at the location pointed to by _s_.
+
== RETURN VALUES
-This function returns 0 on success, and non-zero otherwise.
+These functions return 0 on success, and non-zero otherwise.
== ERRORS