summaryrefslogtreecommitdiff
path: root/docs/reference
diff options
context:
space:
mode:
Diffstat (limited to 'docs/reference')
-rw-r--r--docs/reference/src/SUMMARY.md3
-rw-r--r--docs/reference/src/refs.md2
-rw-r--r--docs/reference/src/sock/nng_bus_open.md5
-rw-r--r--docs/reference/src/sock/nng_pair_open.md60
-rw-r--r--docs/reference/src/sock/nng_pub_open.md9
-rw-r--r--docs/reference/src/sock/nng_pull_open.3.adoc42
-rw-r--r--docs/reference/src/sock/nng_push_open.3.adoc42
-rw-r--r--docs/reference/src/sock/nng_rep_open.3.adoc42
-rw-r--r--docs/reference/src/sock/nng_req_open.3.adoc44
-rw-r--r--docs/reference/src/sock/nng_respondent_open.3.adoc45
-rw-r--r--docs/reference/src/sock/nng_sub_open.md42
-rw-r--r--docs/reference/src/sock/nng_surveyor_open.md43
12 files changed, 371 insertions, 8 deletions
diff --git a/docs/reference/src/SUMMARY.md b/docs/reference/src/SUMMARY.md
index 2315b515..06a2a878 100644
--- a/docs/reference/src/SUMMARY.md
+++ b/docs/reference/src/SUMMARY.md
@@ -54,7 +54,10 @@
- [nng_bus_open](sock/nng_bus_open.md)
- [nng_close](sock/nng_close.md)
- [nng_device](sock/nng_device.md)
+ - [nng_pair_open](sock/nng_pair_open.md)
- [nng_pub_open](sock/nng_pub_open.md)
+ - [nng_sub_open](sock/nng_sub_open.md)
+ - [nng_surveyor_open](sock/nng_surveyor_open.md)
- [Contexts](ctx/index.md)
diff --git a/docs/reference/src/refs.md b/docs/reference/src/refs.md
index 97bea94a..ea27e96e 100644
--- a/docs/reference/src/refs.md
+++ b/docs/reference/src/refs.md
@@ -45,8 +45,8 @@
[nng_req_open]: ../sock/nng_req_open.md
[nng_respondent_open]: ../sock/nng_respondent_open.md
[nng_socket_set]: ../sock/nng_socket_set.md
-[nng_surveyor_open]: ../sock/nng_surveyor_open.md
[nng_sub_open]: ../sock/nng_sub_open.md
+[nng_surveyor_open]: ../sock/nng_surveyor_open.md
[nng_close]: ../sock/nng_close.md
[nng_device]: ../sock/nng_device.md
diff --git a/docs/reference/src/sock/nng_bus_open.md b/docs/reference/src/sock/nng_bus_open.md
index 8705ad6f..9b993f52 100644
--- a/docs/reference/src/sock/nng_bus_open.md
+++ b/docs/reference/src/sock/nng_bus_open.md
@@ -20,9 +20,8 @@ int nng_bus0_open_raw(nng_socket *s);
The `nng_bus0_open()` function creates a [_BUS_][bus] version 0
[socket][socket] and returns it at the location pointed to by _s_.
-The `nng_bus0_open_raw()` function creates a [_BUS_][bus] version 0
-[socket][socket] in
-[raw mode][raw], and returns it at the location pointed to by _s_.
+The `nng_bus0_open_raw()` function creates a _BUS_ version 0
+socket in [raw mode][raw], and returns it at the location pointed to by _s_.
## RETURN VALUES
diff --git a/docs/reference/src/sock/nng_pair_open.md b/docs/reference/src/sock/nng_pair_open.md
new file mode 100644
index 00000000..3fe756b9
--- /dev/null
+++ b/docs/reference/src/sock/nng_pair_open.md
@@ -0,0 +1,60 @@
+# nng_pair_open
+
+## NAME
+
+nng_pair_open --- create _PAIR_ socket
+
+## SYNOPSIS
+
+#### Version 0
+```c
+#include <nng/protocol/pair0/pair.h>
+
+int nng_pair0_open(nng_socket *s);
+
+int nng_pair0_open_raw(nng_socket *s);
+```
+
+#### Version 1
+```c
+#include <nng/protocol/pair1/pair.h>
+
+int nng_pair1_open(nng_socket *s);
+
+int nng_pair1_open_raw(nng_socket *s);
+
+int nng_pair1_open_poly(nng_socktet *s);
+```
+
+## DESCRIPTION
+
+The `nng_pair0_open()` and `nng_pair1_open()` functions
+create a [_PAIR_][pair] version 0 or version 1
+[socket][socket] and return it at the location pointed to by _s_.
+
+The `nng_pair0_open_raw()` and `nng_pair1_open_raw()` functions
+create a _PAIR_ version 0 or version 1 socket in
+[raw mode][raw] and return it at the location pointed to by _s_.
+
+The `nng_pair1_open_poly()` function opens a pair version 1 socket in
+{{i:polyamorous mode}}.
+
+> [!NOTE]
+> Polyamorous mode is deprecated and should not be used in new applications.
+> The `nng_pair1_open_poly()` function will likely be removed in a future release.
+
+## RETURN VALUES
+
+These functions returns 0 on success, and non-zero otherwise.
+
+## ERRORS
+
+* `NNG_ENOMEM`:: Insufficient memory is available.
+* `NNG_ENOTSUP`:: The protocol is not supported.
+
+## SEE ALSO
+
+[Sockets][socket],
+[PAIR Protocol][pair]
+
+{{#include ../refs.md}} \ No newline at end of file
diff --git a/docs/reference/src/sock/nng_pub_open.md b/docs/reference/src/sock/nng_pub_open.md
index 0100cfcb..e340b933 100644
--- a/docs/reference/src/sock/nng_pub_open.md
+++ b/docs/reference/src/sock/nng_pub_open.md
@@ -20,8 +20,8 @@ int nng_pub0_open_raw(nng_socket *s);
The `nng_pub0_open()` function creates a [_PUB_][pub] version 0
[socket][socket] and returns it at the location pointed to by _s_.
-The `nng_pub0_open_raw()` function creates a [_PUB_][pub] version 0
-[socket][socket] in
+The `nng_pub0_open_raw()` function creates a _PUB_ version 0
+socket in
[raw mode][raw] and returns it at the location pointed to by _s_.
## RETURN VALUES
@@ -35,7 +35,8 @@ These functions return 0 on success, and non-zero otherwise.
## SEE ALSO
-[PUB Protocol](../../protocols/pub.md),
-[SUB Protocol](../../protocols/sub.md)
+[Sockets][socket]
+[PUB Protocol][pub],
+[SUB Protocol][sub]
{{#include ../refs.md}}
diff --git a/docs/reference/src/sock/nng_pull_open.3.adoc b/docs/reference/src/sock/nng_pull_open.3.adoc
new file mode 100644
index 00000000..2abb8ca8
--- /dev/null
+++ b/docs/reference/src/sock/nng_pull_open.3.adoc
@@ -0,0 +1,42 @@
+# nng_pull_open(3)
+
+## NAME
+
+nng_pull_open - create pull socket
+
+## SYNOPSIS
+
+```
+#include <nng/nng.h>
+#include <nng/protocol/pipeline0/pull.h>
+
+int nng_pull0_open(nng_socket *s);
+
+int nng_pull0_open_raw(nng_socket *s);
+```
+
+## DESCRIPTION
+
+The `nng_pull0_open()` function creates a xref:nng_pull.7.adoc[_pull_] version 0
+xref:nng_socket.5.adoc[socket] and returns it at the location pointed to by _s_.
+
+The `nng_pull0_open_raw()` function creates a xref:nng_pull.7.adoc[_pull_] version 0
+xref:nng_socket.5.adoc[socket] in
+xref:nng.7.adoc#raw_mode[raw] mode and returns it at the location pointed to by _s_.
+
+## RETURN VALUES
+
+These functions return 0 on success, and non-zero otherwise.
+
+## ERRORS
+
+[horizontal]
+`NNG_ENOMEM`:: Insufficient memory is available.
+`NNG_ENOTSUP`:: The protocol is not supported.
+
+## SEE ALSO
+
+xref:nng_socket.5.adoc[nng_socket(5)],
+xref:nng_pull.7.adoc[nng_pull(7)],
+xref:nng_push.7.adoc[nng_push(7)],
+xref:nng.7.adoc[nng(7)]
diff --git a/docs/reference/src/sock/nng_push_open.3.adoc b/docs/reference/src/sock/nng_push_open.3.adoc
new file mode 100644
index 00000000..80202555
--- /dev/null
+++ b/docs/reference/src/sock/nng_push_open.3.adoc
@@ -0,0 +1,42 @@
+# nng_push_open(3)
+
+## NAME
+
+nng_push_open - create push socket
+
+## SYNOPSIS
+
+```
+#include <nng/nng.h>
+#include <nng/protocol/pipeline0/push.h>
+
+int nng_push0_open(nng_socket *s);
+
+int nng_push0_open_raw(nng_socket *s);
+```
+
+## DESCRIPTION
+
+The `nng_push0_open()` function creates a xref:nng_push.7.adoc[_push_] version 0
+xref:nng_socket.5.adoc[socket] and returns it at the location pointed to by _s_.
+
+The `nng_push0_open_raw()` function creates a xref:nng_push.7.adoc[_push_] version 0
+xref:nng_socket.5.adoc[socket] in
+xref:nng.7.adoc#raw_mode[raw] mode and returns it at the location pointed to by _s_.
+
+## RETURN VALUES
+
+These functions return 0 on success, and non-zero otherwise.
+
+## ERRORS
+
+[horizontal]
+`NNG_ENOMEM`:: Insufficient memory is available.
+`NNG_ENOTSUP`:: The protocol is not supported.
+
+## SEE ALSO
+
+xref:nng_socket.5.adoc[nng_socket(5)],
+xref:nng_pull.7.adoc[nng_pull(7)],
+xref:nng_push.7.adoc[nng_push(7)],
+xref:nng.7.adoc[nng(7)]
diff --git a/docs/reference/src/sock/nng_rep_open.3.adoc b/docs/reference/src/sock/nng_rep_open.3.adoc
new file mode 100644
index 00000000..3b56c541
--- /dev/null
+++ b/docs/reference/src/sock/nng_rep_open.3.adoc
@@ -0,0 +1,42 @@
+# nng_rep_open(3)
+
+## NAME
+
+nng_rep_open - create rep socket
+
+## SYNOPSIS
+
+```
+#include <nng/nng.h>
+#include <nng/protocol/reqrep0/rep.h>
+
+int nng_rep0_open(nng_socket *s);
+
+int nng_rep0_open_raw(nng_socket *);
+```
+
+## DESCRIPTION
+
+The `nng_rep0_open()` function creates a xref:nng_rep.7.adoc[_rep_] version 0
+xref:nng_socket.5.adoc[socket] and returns it at the location pointed to by _s_.
+
+The `nng_rep0_open_raw()` function creates a xref:nng_rep.7.adoc[_rep_] version 0
+xref:nng_socket.5.adoc[socket]
+in xref:nng.7.adoc#raw_mode[raw] mode and returns it at the location pointed to by _s_.
+
+## RETURN VALUES
+
+These functions return 0 on success, and non-zero otherwise.
+
+## ERRORS
+
+[horizontal]
+`NNG_ENOMEM`:: Insufficient memory is available.
+`NNG_ENOTSUP`:: The protocol is not supported.
+
+## SEE ALSO
+
+xref:nng_socket.5.adoc[nng_socket(5)],
+xref:nng_rep.7.adoc[nng_rep(7)],
+xref:nng_req.7.adoc[nng_req(7)],
+xref:nng.7.adoc[nng(7)]
diff --git a/docs/reference/src/sock/nng_req_open.3.adoc b/docs/reference/src/sock/nng_req_open.3.adoc
new file mode 100644
index 00000000..51d1df8a
--- /dev/null
+++ b/docs/reference/src/sock/nng_req_open.3.adoc
@@ -0,0 +1,44 @@
+# nng_req_open(3)
+
+## NAME
+
+nng_req_open - create req socket
+
+## SYNOPSIS
+
+```
+#include <nng/nng.h>
+#include <nng/protocol/reqrep0/req.h>
+
+int nng_req0_open(nng_socket *s);
+
+int nng_req0_open_raw(nng_socket *s);
+```
+
+## DESCRIPTION
+
+The `nng_req0_open()` function creates a xref:nng_req.7.adoc[_req_] version 0
+xref:nng_socket.5.adoc[socket] and returns it at the location pointed to by _s_.
+
+The `nng_req0_open_raw()` function creates a xref:nng_req.7.adoc[_req_] version 0
+xref:nng_socket.5.adoc[socket] in
+xref:nng.7.adoc#raw_mode[raw] mode
+and returns it at the location pointed to by _s_.
+
+## RETURN VALUES
+
+These functions return 0 on success, and non-zero otherwise.
+
+## ERRORS
+
+[horizontal]
+`NNG_ENOMEM`:: Insufficient memory is available.
+`NNG_ENOTSUP`:: The protocol is not supported.
+
+## SEE ALSO
+
+xref:nng_options.5.adoc[nng_options(5)],
+xref:nng_socket.5.adoc[nng_socket(5)],
+xref:nng_rep.7.adoc[nng_rep(7)],
+xref:nng_req.7.adoc[nng_req(7)],
+xref:nng.7.adoc[nng(7)]
diff --git a/docs/reference/src/sock/nng_respondent_open.3.adoc b/docs/reference/src/sock/nng_respondent_open.3.adoc
new file mode 100644
index 00000000..7a1fd6d9
--- /dev/null
+++ b/docs/reference/src/sock/nng_respondent_open.3.adoc
@@ -0,0 +1,45 @@
+# nng_respondent_open(3)
+
+## NAME
+
+nng_respondent_open - create respondent socket
+
+## SYNOPSIS
+
+```
+#include <nng/nng.h>
+#include <nng/protocol/survey0/respond.h>
+
+int nng_respondent0_open(nng_socket *s);
+
+int nng_respondent0_open_raw(nng_socket *s);
+```
+
+## DESCRIPTION
+
+The `nng_respondent0_open()` function creates a
+xref:nng_respondent.7.adoc[_respondent_]
+version 0 xref:nng_socket.5.adoc[socket] and returns it at the location
+pointed to by _s_.
+
+The `nng_respondent0_open_raw()` function creates a
+xref:nng_respondent.7.adoc[_respondent_]
+version 0 xref:nng_socket.5.adoc[socket] in
+xref:nng.7.adoc#raw_mode[raw] mode and returns it at the location pointed to by _s_.
+
+## RETURN VALUES
+
+These functions return 0 on success, and non-zero otherwise.
+
+## ERRORS
+
+[horizontal]
+`NNG_ENOMEM`:: Insufficient memory is available.
+`NNG_ENOTSUP`:: The protocol is not supported.
+
+## SEE ALSO
+
+xref:nng_socket.5.adoc[nng_socket(5)],
+xref:nng_respondent.7.adoc[nng_respondent(7)],
+xref:nng_surveyor.7.adoc[nng_surveyor(7)],
+xref:nng.7.adoc[nng(7)]
diff --git a/docs/reference/src/sock/nng_sub_open.md b/docs/reference/src/sock/nng_sub_open.md
new file mode 100644
index 00000000..d98ecb7f
--- /dev/null
+++ b/docs/reference/src/sock/nng_sub_open.md
@@ -0,0 +1,42 @@
+# nng_sub_open
+
+## NAME
+
+nng_sub_open - create _SUB_ socket
+
+## SYNOPSIS
+
+```c
+#include <nng/nng.h>
+#include <nng/protocol/pubsub0/sub.h>
+
+int nng_sub0_open(nng_socket *s);
+
+int nng_sub0_open_raw(nng_socket *s);
+```
+
+## DESCRIPTION
+
+The `nng_sub0_open()` function creates a [_SUB_][sub] version 0
+[socket][socket] and returns it at the location pointed to by _s_.
+
+The `nng_sub0_open_raw()` function creates a _SUB_ version 0
+socket in
+[raw mode][raw] and returns it at the location pointed to by _s_.
+
+## RETURN VALUES
+
+These functions return 0 on success, and non-zero otherwise.
+
+## ERRORS
+
+* `NNG_ENOMEM`: Insufficient memory is available.
+* `NNG_ENOTSUP`: The protocol is not supported.
+
+## SEE ALSO
+
+[Sockets][socket],
+[_PUB_ Protocol][pub],
+[_SUB_ Protocol][sub]
+
+{{#include ../refs.md}} \ No newline at end of file
diff --git a/docs/reference/src/sock/nng_surveyor_open.md b/docs/reference/src/sock/nng_surveyor_open.md
new file mode 100644
index 00000000..77ac08ae
--- /dev/null
+++ b/docs/reference/src/sock/nng_surveyor_open.md
@@ -0,0 +1,43 @@
+# nng_surveyor_open
+
+## NAME
+
+nng_surveyor_open --- create _SURVEYOR_ socket
+
+## SYNOPSIS
+
+```c
+#include <nng/nng.h>
+#include <nng/protocol/survey0/survey.h>
+
+int nng_surveyor0_open(nng_socket *s);
+
+int nng_surveyor0_open_raw(nng_socket *s);
+```
+
+## DESCRIPTION
+
+The `nng_surveyor0_open()` function creates a [_SURVEYOR_][surveyor]
+version 0 [socket][socket] and returns it at the location
+pointed to by _s_.
+
+The `nng_surveyor0_open_raw()` function creates a _SURVEYOR_
+version 0 socket in
+[raw mode][raw] and returns it at the location pointed to by _s_.
+
+## RETURN VALUES
+
+These functions return 0 on success, and non-zero otherwise.
+
+## ERRORS
+
+- `NNG_ENOMEM`: Insufficient memory is available.
+- `NNG_ENOTSUP`: The protocol is not supported.
+
+## SEE ALSO
+
+[Sockets][socket],
+[_RESPONDENT_ Protocol][respondent],
+[_SURVEYOR_ Protocol][surveyor]
+
+{{#include ../refs.md}}