summaryrefslogtreecommitdiff
path: root/docs/ref
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2024-04-06 21:24:00 -0700
committerGarrett D'Amore <garrett@damore.org>2024-04-06 21:24:00 -0700
commit2d93257eca58e80712e7d330481ece373da70fe9 (patch)
tree43de3b8e0c58b154e5f1cdf1c1e5adbff2a78d8f /docs/ref
parent008e579773ee7e8371ae739ef2392fa2e8a1ffd6 (diff)
downloadnng-2d93257eca58e80712e7d330481ece373da70fe9.tar.gz
nng-2d93257eca58e80712e7d330481ece373da70fe9.tar.bz2
nng-2d93257eca58e80712e7d330481ece373da70fe9.zip
nng_xxx_open converted.
Diffstat (limited to 'docs/ref')
-rw-r--r--docs/ref/sock/nng_bus_open.adoc35
-rw-r--r--docs/ref/sock/nng_pair_open.adoc47
-rw-r--r--docs/ref/sock/nng_pub_open.adoc34
-rw-r--r--docs/ref/sock/nng_pull_open.adoc34
-rw-r--r--docs/ref/sock/nng_push_open.adoc34
-rw-r--r--docs/ref/sock/nng_rep_open.adoc34
-rw-r--r--docs/ref/sock/nng_req_open.adoc34
-rw-r--r--docs/ref/sock/nng_respondent_open.adoc34
-rw-r--r--docs/ref/sock/nng_sub_open.adoc34
-rw-r--r--docs/ref/sock/nng_surveyor_open.adoc35
10 files changed, 355 insertions, 0 deletions
diff --git a/docs/ref/sock/nng_bus_open.adoc b/docs/ref/sock/nng_bus_open.adoc
new file mode 100644
index 00000000..75d33b51
--- /dev/null
+++ b/docs/ref/sock/nng_bus_open.adoc
@@ -0,0 +1,35 @@
+## nng_bus_open
+
+Create bus socket.
+
+### Synopsis
+
+```c
+#include <nng/nng.h>
+#include <nng/protocol/bus0/bus.h>
+
+int nng_bus0_open(nng_socket *s);
+int nng_bus0_open_raw(nng_socket *s);
+```
+
+### Description
+
+The `nng_bus0_open` function creates a xref:../proto/bus.adoc[_BUS_] version 0
+xref:index.adoc[socket] and returns it at the location pointed to by _s_.
+
+The `nng_bus0_open_raw` function creates a _BUS_ version 0 socket in
+xref:../sock/raw.adoc[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:../proto/bus.adoc[Bus Protocol (_BUS_)]
diff --git a/docs/ref/sock/nng_pair_open.adoc b/docs/ref/sock/nng_pair_open.adoc
new file mode 100644
index 00000000..b78353b1
--- /dev/null
+++ b/docs/ref/sock/nng_pair_open.adoc
@@ -0,0 +1,47 @@
+## 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 xref:nng_pair.adoc[_PAIR_] version 0 or version 1 xref:../index.adoc[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 xref:../sock/raw.adoc[raw mode] and return it at the location pointed to by _s_.
+
+The `nng_pair1_open_poly` function opens a pair version 1 socket in polyamorous mode.
+
+NOTE: Polyamorous mode is deprecated.
+
+### Return Values
+
+These functions returns 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:../proto/pair.adoc[Pair Protocol (_PAIR_)]
diff --git a/docs/ref/sock/nng_pub_open.adoc b/docs/ref/sock/nng_pub_open.adoc
new file mode 100644
index 00000000..8bf01c90
--- /dev/null
+++ b/docs/ref/sock/nng_pub_open.adoc
@@ -0,0 +1,34 @@
+## nng_pub_open
+
+Create pub socket.
+
+### Synopsis
+
+```c
+#include <nng/nng.h>
+#include <nng/protocol/pubsub0/pub.h>
+
+int nng_pub0_open(nng_socket *s);
+int nng_pub0_open_raw(nng_socket *s);
+```
+
+### Description
+
+The `nng_pub0_open` function creates a xref:../proto/pub.adoc[_PUB_] version 0 xref:../index.adoc[socket] and returns it at the location pointed to by _s_.
+
+The `nng_pub0_open_raw` function creates a _PUB_ version 0 socket in xref:../sock/raw.adoc[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:../proto/pub.adoc[Publisher Protocol (_PUB_)],
+xref:../proto/sub.adoc[Subscriber Protocol (_SUB_)]
diff --git a/docs/ref/sock/nng_pull_open.adoc b/docs/ref/sock/nng_pull_open.adoc
new file mode 100644
index 00000000..edecf0b4
--- /dev/null
+++ b/docs/ref/sock/nng_pull_open.adoc
@@ -0,0 +1,34 @@
+## nng_pull_open
+
+Create pull socket.
+
+### Synopsis
+
+```c
+#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:../proto/pull.adoc[_PULL_] version 0 xref:../sock/index.adoc[socket] and returns it at the location pointed to by _s_.
+
+The `nng_pull0_open_raw` function creates a _PULL_ version 0 socket in xref:../sock/raw.adoc[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:../proto/pull.adoc[Pull Protocol (_PULL_)],
+xref:../proto/push.adoc[Push Protocol (_PUSH_)]
diff --git a/docs/ref/sock/nng_push_open.adoc b/docs/ref/sock/nng_push_open.adoc
new file mode 100644
index 00000000..4c628c5e
--- /dev/null
+++ b/docs/ref/sock/nng_push_open.adoc
@@ -0,0 +1,34 @@
+## nng_push_open
+
+Create push socket.
+
+### Synopsis
+
+```c
+#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:../proto/push.adoc[_PUSH_] version 0 xref:../sock/index.adoc[socket] and returns it at the location pointed to by _s_.
+
+The `nng_push0_open_raw` function creates a _PUSH_ version 0 socket in xref:../sock/index.adoc[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:../proto/pull.adoc[Pull Protocol (_PULL_)],
+xref:../proto/push.adoc[Push Protocol (_PUSH_)]
diff --git a/docs/ref/sock/nng_rep_open.adoc b/docs/ref/sock/nng_rep_open.adoc
new file mode 100644
index 00000000..170d94ca
--- /dev/null
+++ b/docs/ref/sock/nng_rep_open.adoc
@@ -0,0 +1,34 @@
+## nng_rep_open
+
+Create rep socket.
+
+### Synopsis
+
+```c
+#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:../proto/rep.adoc[_REP_] version 0 xref:../sock/index.adoc[socket] and returns it at the location pointed to by _s_.
+
+The `nng_rep0_open_raw` function creates a _REP_ version 0 socket in xref:../sock/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:../proto/rep.adoc[Replier Protocol (_REP_)]
+xref:../proto/req.adoc[Requester Protocol (_REQ_)]
diff --git a/docs/ref/sock/nng_req_open.adoc b/docs/ref/sock/nng_req_open.adoc
new file mode 100644
index 00000000..c0092f4d
--- /dev/null
+++ b/docs/ref/sock/nng_req_open.adoc
@@ -0,0 +1,34 @@
+## nng_req_open
+
+Create req socket.
+
+### Synopsis
+
+```c
+#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:../proto/req.adoc[_REQ_] version 0 xref:../sock/index.adoc[socket] and returns it at the location pointed to by _s_.
+
+The `nng_req0_open_raw` function creates a _REQ_ version 0 socket in xref:../sock/raw.adoc[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:../proto/rep.adoc[Replier Protocol (_REP_)]
+xref:../proto/req.adoc[Requester Protocol (_REQ_)]
diff --git a/docs/ref/sock/nng_respondent_open.adoc b/docs/ref/sock/nng_respondent_open.adoc
new file mode 100644
index 00000000..e8241a75
--- /dev/null
+++ b/docs/ref/sock/nng_respondent_open.adoc
@@ -0,0 +1,34 @@
+## nng_respondent_open
+
+Create respondent socket.
+
+### Synopsis
+
+```c
+#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.adoc[_RESPONDENT_] version 0 xref:../sock/index.adoc[socket] and returns it at the location pointed to by _s_.
+
+The `nng_respondent0_open_raw` function creates a _RESPONDENT_ socket in xref:../sock/raw.adoc[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:../proto/respondent.adoc[Respondent Protocol (_RESPONDENT_)],
+xref:../proto/surveyor.adoc[Surveyor Protocol (_SURVEYOR_)]
diff --git a/docs/ref/sock/nng_sub_open.adoc b/docs/ref/sock/nng_sub_open.adoc
new file mode 100644
index 00000000..60e6865d
--- /dev/null
+++ b/docs/ref/sock/nng_sub_open.adoc
@@ -0,0 +1,34 @@
+## 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 xref:../proto/sub.adoc[_SUB_] version 0 xref:../sock/index.adoc[socket] and returns it at the location pointed to by _s_.
+
+The `nng_sub0_open_raw` function creates a _SUB_ version 0 socket in xref:../sock/raw.adoc[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:../proto/pub.adoc[Publisher Protocol (_PUB_)],
+xref:../proto/sub.adoc[Subscriber Protocol (_SUB_)]
diff --git a/docs/ref/sock/nng_surveyor_open.adoc b/docs/ref/sock/nng_surveyor_open.adoc
new file mode 100644
index 00000000..e00c818a
--- /dev/null
+++ b/docs/ref/sock/nng_surveyor_open.adoc
@@ -0,0 +1,35 @@
+## 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 xref:../proto/surveyor.adoc[_SURVEYOR_] version 0 xref:../sock/index.adoc[socket] and returns it at the location pointed to by _s_.
+
+The `nng_surveyor0_open_raw` function creates a _SURVEYOR_ version 0 socket in xref:../sock/raw.adoc[raw mode]
+version 0 xref:nng_socket.adoc[socket] in 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:../proto/respondent.adoc[Respondent Protocol (_RESPONDENT_)],
+xref:../proto/surveyor.adoc[Surveyor Protocol (_SURVEYOR_)]