diff options
| author | Garrett D'Amore <garrett@damore.org> | 2024-04-06 21:24:00 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2024-04-06 21:24:00 -0700 |
| commit | 2d93257eca58e80712e7d330481ece373da70fe9 (patch) | |
| tree | 43de3b8e0c58b154e5f1cdf1c1e5adbff2a78d8f | |
| parent | 008e579773ee7e8371ae739ef2392fa2e8a1ffd6 (diff) | |
| download | nng-2d93257eca58e80712e7d330481ece373da70fe9.tar.gz nng-2d93257eca58e80712e7d330481ece373da70fe9.tar.bz2 nng-2d93257eca58e80712e7d330481ece373da70fe9.zip | |
nng_xxx_open converted.
| -rw-r--r-- | docs/man/nng_bus_open.3.adoc | 52 | ||||
| -rw-r--r-- | docs/man/nng_pair_open.3.adoc | 72 | ||||
| -rw-r--r-- | docs/man/nng_pub_open.3.adoc | 53 | ||||
| -rw-r--r-- | docs/man/nng_pull_open.3.adoc | 53 | ||||
| -rw-r--r-- | docs/man/nng_push_open.3.adoc | 53 | ||||
| -rw-r--r-- | docs/man/nng_rep_open.3.adoc | 53 | ||||
| -rw-r--r-- | docs/man/nng_req_open.3.adoc | 55 | ||||
| -rw-r--r-- | docs/man/nng_respondent_open.3.adoc | 56 | ||||
| -rw-r--r-- | docs/man/nng_sub_open.3.adoc | 53 | ||||
| -rw-r--r-- | docs/man/nng_surveyor_open.3.adoc | 54 | ||||
| -rw-r--r-- | docs/ref/sock/nng_bus_open.adoc | 35 | ||||
| -rw-r--r-- | docs/ref/sock/nng_pair_open.adoc | 47 | ||||
| -rw-r--r-- | docs/ref/sock/nng_pub_open.adoc | 34 | ||||
| -rw-r--r-- | docs/ref/sock/nng_pull_open.adoc | 34 | ||||
| -rw-r--r-- | docs/ref/sock/nng_push_open.adoc | 34 | ||||
| -rw-r--r-- | docs/ref/sock/nng_rep_open.adoc | 34 | ||||
| -rw-r--r-- | docs/ref/sock/nng_req_open.adoc | 34 | ||||
| -rw-r--r-- | docs/ref/sock/nng_respondent_open.adoc | 34 | ||||
| -rw-r--r-- | docs/ref/sock/nng_sub_open.adoc | 34 | ||||
| -rw-r--r-- | docs/ref/sock/nng_surveyor_open.adoc | 35 |
20 files changed, 355 insertions, 554 deletions
diff --git a/docs/man/nng_bus_open.3.adoc b/docs/man/nng_bus_open.3.adoc deleted file mode 100644 index 3477a903..00000000 --- a/docs/man/nng_bus_open.3.adoc +++ /dev/null @@ -1,52 +0,0 @@ -= nng_bus_open(3) -// -// Copyright 2018 Staysail Systems, Inc. <info@staysail.tech> -// Copyright 2018 Capitar IT Group BV <info@capitar.com> -// -// This document is supplied under the terms of the MIT License, a -// copy of which should be located in the distribution where this -// file was obtained (LICENSE.txt). A copy of the license may also be -// found online at https://opensource.org/licenses/MIT. -// - -== NAME - -nng_bus_open - create bus socket - -== SYNOPSIS - -[source,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:nng_bus.7.adoc[_bus_] version 0 -xref:nng_socket.5.adoc[socket] and returns it at the location pointed to by _s_. - -The `nng_bus0_open_raw()` function creates a xref:nng_bus.7.adoc[_bus_] 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 - -[.text-left] -xref:nng_socket.5.adoc[nng_socket(5)], -xref:nng_bus.7.adoc[nng_bus(7)], -xref:nng.7.adoc[nng(7)] diff --git a/docs/man/nng_pair_open.3.adoc b/docs/man/nng_pair_open.3.adoc deleted file mode 100644 index 20348123..00000000 --- a/docs/man/nng_pair_open.3.adoc +++ /dev/null @@ -1,72 +0,0 @@ -= nng_pair_open(3) -// -// Copyright 2018 Staysail Systems, Inc. <info@staysail.tech> -// Copyright 2018 Capitar IT Group BV <info@capitar.com> -// -// This document is supplied under the terms of the MIT License, a -// copy of which should be located in the distribution where this -// file was obtained (LICENSE.txt). A copy of the license may also be -// found online at https://opensource.org/licenses/MIT. -// - -== NAME - -nng_pair_open - create pair socket - -== SYNOPSIS - -.Version 0 -[source,c] ----- -#include <nng/protocol/pair0/pair.h> - -int nng_pair0_open(nng_socket *s); - -int nng_pair0_open_raw(nng_socket *s); ----- - -.Version 1 -[source,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.7.adoc[_pair_] version 0 or version 1 -xref:nng_socket.5.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 xref:nng_pair.7.adoc[_pair_] version 0 or version 1 -xref:nng_socket.5.adoc[socket] in -xref:nng.7.adoc#raw_mode[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 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 - -[horizontal] -`NNG_ENOMEM`:: Insufficient memory is available. -`NNG_ENOTSUP`:: The protocol is not supported. - -== SEE ALSO - -[.text-left] -xref:nng_socket.5.adoc[nng_socket(5)], -xref:nng_pair.7.adoc[nng_pair(7)], -xref:nng.7.adoc[nng(7)] diff --git a/docs/man/nng_pub_open.3.adoc b/docs/man/nng_pub_open.3.adoc deleted file mode 100644 index c9f3b5b5..00000000 --- a/docs/man/nng_pub_open.3.adoc +++ /dev/null @@ -1,53 +0,0 @@ -= nng_pub_open(3) -// -// Copyright 2018 Staysail Systems, Inc. <info@staysail.tech> -// Copyright 2018 Capitar IT Group BV <info@capitar.com> -// -// This document is supplied under the terms of the MIT License, a -// copy of which should be located in the distribution where this -// file was obtained (LICENSE.txt). A copy of the license may also be -// found online at https://opensource.org/licenses/MIT. -// - -== NAME - -nng_pub_open - create pub socket - -== SYNOPSIS - -[source,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:nng_pub.7.adoc[_pub_] version 0 -xref:nng_socket.5.adoc[socket] and returns it at the location pointed to by _s_. - -The `nng_pub0_open_raw()` function creates a xref:nng_pub.7.adoc[_pub_] 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 - -[.text-left] -xref:nng_socket.5.adoc[nng_socket(5)], -xref:nng_pub.7.adoc[nng_pub(7)], -xref:nng_sub.7.adoc[nng_sub(7)], -xref:nng.7.adoc[nng(7)] diff --git a/docs/man/nng_pull_open.3.adoc b/docs/man/nng_pull_open.3.adoc deleted file mode 100644 index 12f85978..00000000 --- a/docs/man/nng_pull_open.3.adoc +++ /dev/null @@ -1,53 +0,0 @@ -= nng_pull_open(3) -// -// Copyright 2018 Staysail Systems, Inc. <info@staysail.tech> -// Copyright 2018 Capitar IT Group BV <info@capitar.com> -// -// This document is supplied under the terms of the MIT License, a -// copy of which should be located in the distribution where this -// file was obtained (LICENSE.txt). A copy of the license may also be -// found online at https://opensource.org/licenses/MIT. -// - -== NAME - -nng_pull_open - create pull socket - -== SYNOPSIS - -[source,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: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 - -[.text-left] -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/man/nng_push_open.3.adoc b/docs/man/nng_push_open.3.adoc deleted file mode 100644 index 1b1635ef..00000000 --- a/docs/man/nng_push_open.3.adoc +++ /dev/null @@ -1,53 +0,0 @@ -= nng_push_open(3) -// -// Copyright 2018 Staysail Systems, Inc. <info@staysail.tech> -// Copyright 2018 Capitar IT Group BV <info@capitar.com> -// -// This document is supplied under the terms of the MIT License, a -// copy of which should be located in the distribution where this -// file was obtained (LICENSE.txt). A copy of the license may also be -// found online at https://opensource.org/licenses/MIT. -// - -== NAME - -nng_push_open - create push socket - -== SYNOPSIS - -[source,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: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 - -[.text-left] -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/man/nng_rep_open.3.adoc b/docs/man/nng_rep_open.3.adoc deleted file mode 100644 index dd62201d..00000000 --- a/docs/man/nng_rep_open.3.adoc +++ /dev/null @@ -1,53 +0,0 @@ -= nng_rep_open(3) -// -// Copyright 2018 Staysail Systems, Inc. <info@staysail.tech> -// Copyright 2018 Capitar IT Group BV <info@capitar.com> -// -// This document is supplied under the terms of the MIT License, a -// copy of which should be located in the distribution where this -// file was obtained (LICENSE.txt). A copy of the license may also be -// found online at https://opensource.org/licenses/MIT. -// - -== NAME - -nng_rep_open - create rep socket - -== SYNOPSIS - -[source,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: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 - -[.text-left] -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/man/nng_req_open.3.adoc b/docs/man/nng_req_open.3.adoc deleted file mode 100644 index 0fd07944..00000000 --- a/docs/man/nng_req_open.3.adoc +++ /dev/null @@ -1,55 +0,0 @@ -= nng_req_open(3) -// -// Copyright 2018 Staysail Systems, Inc. <info@staysail.tech> -// Copyright 2018 Capitar IT Group BV <info@capitar.com> -// -// This document is supplied under the terms of the MIT License, a -// copy of which should be located in the distribution where this -// file was obtained (LICENSE.txt). A copy of the license may also be -// found online at https://opensource.org/licenses/MIT. -// - -== NAME - -nng_req_open - create req socket - -== SYNOPSIS - -[source,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: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 - -[.text-left] -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/man/nng_respondent_open.3.adoc b/docs/man/nng_respondent_open.3.adoc deleted file mode 100644 index 5a5167d2..00000000 --- a/docs/man/nng_respondent_open.3.adoc +++ /dev/null @@ -1,56 +0,0 @@ -= nng_respondent_open(3) -// -// Copyright 2018 Staysail Systems, Inc. <info@staysail.tech> -// Copyright 2018 Capitar IT Group BV <info@capitar.com> -// -// This document is supplied under the terms of the MIT License, a -// copy of which should be located in the distribution where this -// file was obtained (LICENSE.txt). A copy of the license may also be -// found online at https://opensource.org/licenses/MIT. -// - -== NAME - -nng_respondent_open - create respondent socket - -== SYNOPSIS - -[source,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.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 - -[.text-left] -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/man/nng_sub_open.3.adoc b/docs/man/nng_sub_open.3.adoc deleted file mode 100644 index ea01673c..00000000 --- a/docs/man/nng_sub_open.3.adoc +++ /dev/null @@ -1,53 +0,0 @@ -= nng_sub_open(3) -// -// Copyright 2018 Staysail Systems, Inc. <info@staysail.tech> -// Copyright 2018 Capitar IT Group BV <info@capitar.com> -// -// This document is supplied under the terms of the MIT License, a -// copy of which should be located in the distribution where this -// file was obtained (LICENSE.txt). A copy of the license may also be -// found online at https://opensource.org/licenses/MIT. -// - -== NAME - -nng_sub_open - create sub socket - -== SYNOPSIS - -[source,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:nng_sub.7.adoc[_sub_] version 0 -xref:nng_socket.5.adoc[socket] and returns it at the location pointed to by _s_. - -The `nng_sub0_open_raw()` function creates a xref:nng_sub.7.adoc[_sub_] 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 - -[.text-left] -xref:nng_socket.5.adoc[nng_socket(5)], -xref:nng_pub.7.adoc[nng_pub(7)], -xref:nng_sub.7.adoc[nng_sub(7)], -xref:nng.7.adoc[nng(7)] diff --git a/docs/man/nng_surveyor_open.3.adoc b/docs/man/nng_surveyor_open.3.adoc deleted file mode 100644 index cd648f65..00000000 --- a/docs/man/nng_surveyor_open.3.adoc +++ /dev/null @@ -1,54 +0,0 @@ -= nng_surveyor_open(3) -// -// Copyright 2018 Staysail Systems, Inc. <info@staysail.tech> -// Copyright 2018 Capitar IT Group BV <info@capitar.com> -// -// This document is supplied under the terms of the MIT License, a -// copy of which should be located in the distribution where this -// file was obtained (LICENSE.txt). A copy of the license may also be -// found online at https://opensource.org/licenses/MIT. -// - -== NAME - -nng_surveyor_open - create surveyor socket - -== SYNOPSIS - -[source,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:nng_surveyor.7.adoc[_surveyor_] -version 0 xref:nng_socket.5.adoc[socket] and returns it at the location -pointed to by _s_. - -The `nng_surveyor0_open_raw()` function creates a xref:nng_surveyor.7.adoc[_surveyor_] -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 - -[.text-left] -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/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_)] |
