diff options
| author | Garrett D'Amore <garrett@damore.org> | 2024-03-30 21:33:42 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2024-03-30 21:33:42 -0700 |
| commit | 2e87cb315954bb4ed92ebb71c355fddff9e992e3 (patch) | |
| tree | 4bcf94c6cf04fffaa7aebc2553fa4115fad030e7 | |
| parent | 454c4a6d2af3becb703005d1805e001d3d0c76f1 (diff) | |
| download | nng-2e87cb315954bb4ed92ebb71c355fddff9e992e3.tar.gz nng-2e87cb315954bb4ed92ebb71c355fddff9e992e3.tar.bz2 nng-2e87cb315954bb4ed92ebb71c355fddff9e992e3.zip | |
nng_pair_open
| -rw-r--r-- | docs/man/nng_pair_open.3.adoc | 72 | ||||
| -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/reference/src/SUMMARY.md | 3 | ||||
| -rw-r--r-- | docs/reference/src/refs.md | 2 | ||||
| -rw-r--r-- | docs/reference/src/sock/nng_bus_open.md | 5 | ||||
| -rw-r--r-- | docs/reference/src/sock/nng_pair_open.md | 60 | ||||
| -rw-r--r-- | docs/reference/src/sock/nng_pub_open.md | 9 | ||||
| -rw-r--r-- | docs/reference/src/sock/nng_pull_open.3.adoc (renamed from docs/man/nng_pull_open.3.adoc) | 31 | ||||
| -rw-r--r-- | docs/reference/src/sock/nng_push_open.3.adoc (renamed from docs/man/nng_push_open.3.adoc) | 31 | ||||
| -rw-r--r-- | docs/reference/src/sock/nng_rep_open.3.adoc (renamed from docs/man/nng_rep_open.3.adoc) | 31 | ||||
| -rw-r--r-- | docs/reference/src/sock/nng_req_open.3.adoc (renamed from docs/man/nng_req_open.3.adoc) | 31 | ||||
| -rw-r--r-- | docs/reference/src/sock/nng_respondent_open.3.adoc (renamed from docs/man/nng_respondent_open.3.adoc) | 31 | ||||
| -rw-r--r-- | docs/reference/src/sock/nng_sub_open.md | 42 | ||||
| -rw-r--r-- | docs/reference/src/sock/nng_surveyor_open.md | 43 |
15 files changed, 206 insertions, 292 deletions
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_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/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/man/nng_pull_open.3.adoc b/docs/reference/src/sock/nng_pull_open.3.adoc index 12f85978..2abb8ca8 100644 --- a/docs/man/nng_pull_open.3.adoc +++ b/docs/reference/src/sock/nng_pull_open.3.adoc @@ -1,31 +1,21 @@ -= 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(3) + +## NAME nng_pull_open - create pull socket -== SYNOPSIS +## 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 +## 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_. @@ -34,19 +24,18 @@ The `nng_pull0_open_raw()` function creates a xref:nng_pull.7.adoc[_pull_] versi 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 +## RETURN VALUES These functions return 0 on success, and non-zero otherwise. -== ERRORS +## ERRORS [horizontal] `NNG_ENOMEM`:: Insufficient memory is available. `NNG_ENOTSUP`:: The protocol is not supported. -== SEE ALSO +## 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)], diff --git a/docs/man/nng_push_open.3.adoc b/docs/reference/src/sock/nng_push_open.3.adoc index 1b1635ef..80202555 100644 --- a/docs/man/nng_push_open.3.adoc +++ b/docs/reference/src/sock/nng_push_open.3.adoc @@ -1,31 +1,21 @@ -= 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(3) + +## NAME nng_push_open - create push socket -== SYNOPSIS +## 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 +## 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_. @@ -34,19 +24,18 @@ The `nng_push0_open_raw()` function creates a xref:nng_push.7.adoc[_push_] versi 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 +## RETURN VALUES These functions return 0 on success, and non-zero otherwise. -== ERRORS +## ERRORS [horizontal] `NNG_ENOMEM`:: Insufficient memory is available. `NNG_ENOTSUP`:: The protocol is not supported. -== SEE ALSO +## 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)], diff --git a/docs/man/nng_rep_open.3.adoc b/docs/reference/src/sock/nng_rep_open.3.adoc index dd62201d..3b56c541 100644 --- a/docs/man/nng_rep_open.3.adoc +++ b/docs/reference/src/sock/nng_rep_open.3.adoc @@ -1,31 +1,21 @@ -= 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(3) + +## NAME nng_rep_open - create rep socket -== SYNOPSIS +## 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 +## 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_. @@ -34,19 +24,18 @@ The `nng_rep0_open_raw()` function creates a xref:nng_rep.7.adoc[_rep_] version 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 +## RETURN VALUES These functions return 0 on success, and non-zero otherwise. -== ERRORS +## ERRORS [horizontal] `NNG_ENOMEM`:: Insufficient memory is available. `NNG_ENOTSUP`:: The protocol is not supported. -== SEE ALSO +## 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)], diff --git a/docs/man/nng_req_open.3.adoc b/docs/reference/src/sock/nng_req_open.3.adoc index 0fd07944..51d1df8a 100644 --- a/docs/man/nng_req_open.3.adoc +++ b/docs/reference/src/sock/nng_req_open.3.adoc @@ -1,31 +1,21 @@ -= 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(3) + +## NAME nng_req_open - create req socket -== SYNOPSIS +## 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 +## 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_. @@ -35,19 +25,18 @@ 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 +## RETURN VALUES These functions return 0 on success, and non-zero otherwise. -== ERRORS +## ERRORS [horizontal] `NNG_ENOMEM`:: Insufficient memory is available. `NNG_ENOTSUP`:: The protocol is not supported. -== SEE ALSO +## 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)], diff --git a/docs/man/nng_respondent_open.3.adoc b/docs/reference/src/sock/nng_respondent_open.3.adoc index 5a5167d2..7a1fd6d9 100644 --- a/docs/man/nng_respondent_open.3.adoc +++ b/docs/reference/src/sock/nng_respondent_open.3.adoc @@ -1,31 +1,21 @@ -= 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(3) + +## NAME nng_respondent_open - create respondent socket -== SYNOPSIS +## 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 +## DESCRIPTION The `nng_respondent0_open()` function creates a xref:nng_respondent.7.adoc[_respondent_] @@ -37,19 +27,18 @@ 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 +## RETURN VALUES These functions return 0 on success, and non-zero otherwise. -== ERRORS +## ERRORS [horizontal] `NNG_ENOMEM`:: Insufficient memory is available. `NNG_ENOTSUP`:: The protocol is not supported. -== SEE ALSO +## 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)], 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}} |
