forked from nanomsg/nng
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Markup changes, started adding type documentation.
- Loading branch information
Showing
4 changed files
with
157 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
= nng_duration(5) | ||
// | ||
// Copyright 2018 Staysail Systems, Inc. <[email protected]> | ||
// Copyright 2018 Capitar IT Group BV <[email protected]> | ||
// | ||
// 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_duration - relative time in milliseconds | ||
|
||
== SYNOPSIS | ||
|
||
[source, c] | ||
----------- | ||
#include <nng/nng.h> | ||
typedef int32_t nng_duration; | ||
#define NNG_DURATION_INFINITE (-1) | ||
#define NNG_DURATION_DEFAULT (-2) | ||
#define NNG_DURATION_ZERO (0) | ||
----------- | ||
|
||
== DESCRIPTION | ||
|
||
An ((`nng_duration`))(((duration))) is a relative time, measured in | ||
milliseconds. | ||
This type is most often used in conjuction with timers and timeouts. | ||
|
||
A couple of special values have been set aside, and carry special meanings. | ||
|
||
[[NNG_DURATION_DEFAULT]]((`NNG_DURATION_DEFAULT`))::: | ||
Indicates a context-specific default value should be used. | ||
|
||
[[NNG_DURATION_INFINITE]]((`NNG_DURATION_INFINITE`))::: | ||
Effectively an infinite duration; used most often to disable timeouts. | ||
|
||
[[NNG_DURATION_ZERO]]((`NNG_DURATION_ZERO`))::: | ||
Zero length duration; used to perform a single polling operation. | ||
|
||
== SEE ALSO | ||
[.text-left] | ||
<<nng_options#,nng_options(5)>>, | ||
<<nng#,nng(7)>> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
= nng_socket(5) | ||
// | ||
// Copyright 2018 Staysail Systems, Inc. <[email protected]> | ||
// Copyright 2018 Capitar IT Group BV <[email protected]> | ||
// | ||
// 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_socket - socket handle | ||
|
||
== SYNOPSIS | ||
|
||
[source, c] | ||
----------- | ||
#include <nng/nng.h> | ||
typedef uint32_t nng_socket; | ||
----------- | ||
|
||
== DESCRIPTION | ||
|
||
An ((`nng_socket`))(((socket))) is a handle to an underlying "`socket`" object. | ||
All communication between the application and remote Scalability Protocol | ||
peers is done through sockets. | ||
A given socket can have multiple dialers (<<nng_dialer#,`nng_dialer`>>) | ||
and/or (<<nng_listener#,`nng_listener`>>), and multiple | ||
pipes (<<nng_pipe#,`nng_pipe`>>), and | ||
may be connected to multiple transports at the same time. | ||
However, a given socket will have exactly one "`protocol`" associated with it, | ||
and is responsible for any state machines or other protocol-specific logic. | ||
|
||
NOTE: Although `nng_socket` is an integer data type, these objects are not | ||
ordinary file descriptors, and can only be used with the functions that | ||
explicitly indicate that it safe and appropropate to do so. | ||
|
||
Each `nng_socket` is created by a protocol-specific constructor, such as | ||
<<nng_rep0_open#,`nng_rep0_open()`>>. | ||
When the socket is no longer needed, it can be closed with | ||
<<nng_close#,`nng_close()`>>. | ||
|
||
== SEE ALSO | ||
|
||
[.text-left] | ||
<<libnng#,libnng(3)>>, | ||
<<nng_close#,nng_close(3)>>, | ||
<<nng_dialer#,nng_dialer(5)>>, | ||
<<nng_listener#,nng_listener(5)>>, | ||
<<nng_options#,nng_options(5)>>, | ||
<<nng#,nng(7)>> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters