From b604728cfb0be6adfed7c80fa7d14a0b6490c281 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Wed, 7 Feb 2018 14:01:35 -0800 Subject: man page updates for 0.2.0 --- man/v0.2.0/nng_aio_finish.html | 627 ++++++++++++++++++++++++++++++ man/v0.2.0/nng_http_client_alloc.html | 606 +++++++++++++++++++++++++++++ man/v0.2.0/nng_http_client_connect.html | 670 ++++++++++++++++++++++++++++++++ man/v0.2.0/nng_http_client_free.html | 608 +++++++++++++++++++++++++++++ man/v0.2.0/nng_http_client_get_tls.html | 610 +++++++++++++++++++++++++++++ man/v0.2.0/nng_http_client_set_tls.html | 636 ++++++++++++++++++++++++++++++ man/v0.2.0/nng_http_server_set_tls.html | 4 +- 7 files changed, 3759 insertions(+), 2 deletions(-) create mode 100644 man/v0.2.0/nng_aio_finish.html create mode 100644 man/v0.2.0/nng_http_client_alloc.html create mode 100644 man/v0.2.0/nng_http_client_connect.html create mode 100644 man/v0.2.0/nng_http_client_free.html create mode 100644 man/v0.2.0/nng_http_client_get_tls.html create mode 100644 man/v0.2.0/nng_http_client_set_tls.html (limited to 'man') diff --git a/man/v0.2.0/nng_aio_finish.html b/man/v0.2.0/nng_aio_finish.html new file mode 100644 index 00000000..21f78451 --- /dev/null +++ b/man/v0.2.0/nng_aio_finish.html @@ -0,0 +1,627 @@ +--- +version: 0.2.0 +layout: default +--- + + + + + + + + +nng_aio_finish(3) + + + + + + + +
+
+

SYNOPSIS

+
+
+
+
#include <nng/nng.h>
+
+void nng_aio_finish(nng_aio *aio, int err);
+
+
+
+
+
+

DESCRIPTION

+
+
+

The nng_aio_finish() function marks operation associated with aio as +complete, with the status err. This will be the result returned by +nng_aio_result(3).

+
+
+

This function causes the callback associated with the aio to called.

+
+
+ + + + + +
+ + +It is mandatory that operation "providers" call this function +EXACTLY ONCE when they are finished with the operation. After calling this +function they MUST NOT perform any further accesses the aio. +
+
+
+ + + + + +
+ + +This function is only for I/O providers (those actually performing +the operation such as HTTP handler function or a transport provider); ordinary +users of the aio should not have any need for this function. +
+
+
+
+
+

RETURN VALUES

+
+
+

None.

+
+
+
+
+

ERRORS

+
+
+

None.

+
+
+
+ +
+ +
+
+

Copyright 2018 Staysail Systems, Inc.
+Copyright 2018 Capitar IT Group BV
+
+This document is supplied under the terms of the MIT License.

+
+
+
+
+ + + diff --git a/man/v0.2.0/nng_http_client_alloc.html b/man/v0.2.0/nng_http_client_alloc.html new file mode 100644 index 00000000..7de33dc6 --- /dev/null +++ b/man/v0.2.0/nng_http_client_alloc.html @@ -0,0 +1,606 @@ +--- +version: 0.2.0 +layout: default +--- + + + + + + + + +nng_http_client_alloc(3) + + + + + + + +
+
+

SYNOPSIS

+
+
+
+
#include <nng/nng.h>
+
+int nng_http_client_alloc(nng_http_client *clientp, const nng_url *url);
+
+
+
+
+
+

DESCRIPTION

+
+
+

The nng_http_client_alloc() allocates an HTTP client suitable for +connecting to the server identifyed by url and stores a pointer to +it in the location referenced by clientp.

+
+
+
+
+

RETURN VALUES

+
+
+

This function returns 0 on success, and non-zero otherwise.

+
+
+
+
+

ERRORS

+
+
+
+
NNG_ENOMEM
+
+

Insufficient free memory exists.

+
+
NNG_ENOTSUP
+
+

HTTP not supported.

+
+
+
+
+
+ +
+ +
+
+

Copyright 2018 Staysail Systems, Inc.
+Copyright 2018 Capitar IT Group BV
+
+This document is supplied under the terms of the MIT License.

+
+
+
+
+ + + diff --git a/man/v0.2.0/nng_http_client_connect.html b/man/v0.2.0/nng_http_client_connect.html new file mode 100644 index 00000000..edeabff1 --- /dev/null +++ b/man/v0.2.0/nng_http_client_connect.html @@ -0,0 +1,670 @@ +--- +version: 0.2.0 +layout: default +--- + + + + + + + + +nng_http_client_connect(3) + + + + + + + +
+
+

SYNOPSIS

+
+
+
+
#include <nng/nng.h>
+
+void nng_http_client_connect(nng_http_client *client, nng_aio *aio);
+
+
+
+
+
+

DESCRIPTION

+
+
+

The nng_http_client_connect() starts the process of establishing an HTTP +connection from client to the server that was indicated in the URL that +client was configured with.

+
+
+

The result of the operation will be stored in the aio when the operation +is complete, and will be obtainable via +nng_aio_result(3).

+
+
+

On success, a pointer to the underlying HTTP client (type nng_http_conn *) +will be stored in the first output result of the aio, and can be +obtained by +nng_aio_get_output(3) with an index of zero (0).

+
+
+
+
+

RETURN VALUES

+
+
+

None.

+
+
+
+
+

ERRORS

+
+
+
+
NNG_EADDRINVAL
+
+

The server is configured with an invalid address.

+
+
NNG_ECANCELED
+
+

The operation was aborted.

+
+
NNG_ECONNREFUSED
+
+

The TCP connection was refused by the server.

+
+
NNG_ECONNRESET
+
+

The TCP connection was reset by the server.

+
+
NNG_ENOMEM
+
+

Insufficient free memory exists.

+
+
+
+
+
+
+

EXAMPLE

+
+
+
+
    nng_aio *aio;
+    nng_url *url;
+    nng_http_client *client;
+    nng_http_conn *conn;
+    int rv;
+
+    // Error checks elided for clarity.
+    nng_url_parse(&url, "http://www.google.com");
+    nng_aio_alloc(&aio, NULL, NULL);
+    nng_http_client_alloc(&client, url);
+
+    nng_http_client_connect(client, aio);
+
+    // Wait for connection to establish (or attempt to fail).
+    nng_aio_wait(aio);
+
+    if ((rv = nng_aio_result(aio)) != 0) {
+            printf("Connection failed: %s\n", nng_strerror(rv));
+    } else {
+            // Connection established, get it.
+            conn = nng_aio_get_output(aio, 0);
+
+            // ... do something with it here
+
+            // Close the connection when done to avoid leaking it.
+            nng_http_conn_close(conn);
+    }
+
+
+
+
+ +
+ +
+
+

Copyright 2018 Staysail Systems, Inc.
+Copyright 2018 Capitar IT Group BV
+
+This document is supplied under the terms of the MIT License.

+
+
+
+
+ + + diff --git a/man/v0.2.0/nng_http_client_free.html b/man/v0.2.0/nng_http_client_free.html new file mode 100644 index 00000000..33f5d344 --- /dev/null +++ b/man/v0.2.0/nng_http_client_free.html @@ -0,0 +1,608 @@ +--- +version: 0.2.0 +layout: default +--- + + + + + + + + +nng_http_client_free(3) + + + + + + + +
+
+

SYNOPSIS

+
+
+
+
#include <nng/nng.h>
+
+void nng_http_client_free(nng_http_client *client);
+
+
+
+
+
+

DESCRIPTION

+
+
+

The nng_http_client_free() frees the HTTP client and any associated +resources referenced by client.

+
+
+ + + + + +
+ + +Any connections created by +nng_http_client_connect(3) are unaffected, +and so the caller must close those explicitly if desired. +
+
+
+
+
+

RETURN VALUES

+
+
+

None.

+
+
+
+
+

ERRORS

+
+
+

None.

+
+
+
+ +
+ +
+
+

Copyright 2018 Staysail Systems, Inc.
+Copyright 2018 Capitar IT Group BV
+
+This document is supplied under the terms of the MIT License.

+
+
+
+
+ + + diff --git a/man/v0.2.0/nng_http_client_get_tls.html b/man/v0.2.0/nng_http_client_get_tls.html new file mode 100644 index 00000000..63556207 --- /dev/null +++ b/man/v0.2.0/nng_http_client_get_tls.html @@ -0,0 +1,610 @@ +--- +version: 0.2.0 +layout: default +--- + + + + + + + + +nng_http_client_get_tls(3) + + + + + + + +
+
+

SYNOPSIS

+
+
+
+
#include <nng/nng.h>
+
+int nng_http_client_get_tls(nng_http_client *client, nng_tls_config **cfgp);
+
+
+
+
+
+

DESCRIPTION

+
+
+

The nng_http_client_get_tls() obtains the TLS configuration of client and +saves a pointer to it in the address referenced by cfgp.

+
+
+

The configuration will be NULL if the HTTP client instance is not enabled +to use HTTPS.

+
+
+
+
+

RETURN VALUES

+
+
+

This function returns 0 on success, and non-zero otherwise.

+
+
+
+
+

ERRORS

+
+
+
+
NNG_ENOMEM
+
+

Insufficient free memory exists.

+
+
NNG_ENOTSUP
+
+

Either HTTP or TLS not supported.

+
+
+
+
+
+ +
+ +
+
+

Copyright 2018 Staysail Systems, Inc.
+Copyright 2018 Capitar IT Group BV
+
+This document is supplied under the terms of the MIT License.

+
+
+
+
+ + + diff --git a/man/v0.2.0/nng_http_client_set_tls.html b/man/v0.2.0/nng_http_client_set_tls.html new file mode 100644 index 00000000..80345a78 --- /dev/null +++ b/man/v0.2.0/nng_http_client_set_tls.html @@ -0,0 +1,636 @@ +--- +version: 0.2.0 +layout: default +--- + + + + + + + + +nng_http_client_set_tls(3) + + + + + + + +
+
+

SYNOPSIS

+
+
+
+
#include <nng/nng.h>
+
+int nng_http_client_set_tls(nng_http_client *client, nng_tls_config *cfg);
+
+
+
+
+
+

DESCRIPTION

+
+
+

The nng_http_client_set_tls() sets the TLS configuration of client to +cfg.

+
+
+

This change overwrites any previous TLS configuration.

+
+
+ + + + + +
+ + +This also invalidates any previously obtained values from +nng_http_client_get_tls(3). +
+
+
+ + + + + +
+ + +Any connections established with +nng_http_client_connect(3) +will continue to use any TLS configuration that they were started with. +
+
+
+
+
+

RETURN VALUES

+
+
+

This function returns 0 on success, and non-zero otherwise.

+
+
+
+
+

ERRORS

+
+
+
+
NNG_ENOMEM
+
+

Insufficient free memory exists.

+
+
NNG_ENOTSUP
+
+

Either HTTP or TLS not supported.

+
+
+
+
+
+ +
+ +
+
+

Copyright 2018 Staysail Systems, Inc.
+Copyright 2018 Capitar IT Group BV
+
+This document is supplied under the terms of the MIT License.

+
+
+
+
+ + + diff --git a/man/v0.2.0/nng_http_server_set_tls.html b/man/v0.2.0/nng_http_server_set_tls.html index aa2fcf49..b61d4871 100644 --- a/man/v0.2.0/nng_http_server_set_tls.html +++ b/man/v0.2.0/nng_http_server_set_tls.html @@ -542,7 +542,7 @@ body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-b

The nng_http_server_set_tls() sets the TLS configuration of server s to -instance s.

+cfg.

This change overwrites any previous TLS configuration.

@@ -637,7 +637,7 @@ This document is supplied under the terms of the
-- cgit v1.2.3-70-g09d2