aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorRobert Bielik <Robert.Bielik@dirac.com>2019-12-28 08:35:17 +0100
committerGarrett D'Amore <garrett@damore.org>2019-12-29 22:39:13 -0800
commit86b4573c22af46582d5018f9b86cb9f96f5f6c44 (patch)
tree8691841228a0a3bb20cdbe9227f1c4023804eb54 /docs
parent0cf84675edef0290a74dfd1e289c0b9e1bb3fb5c (diff)
downloadnng-86b4573c22af46582d5018f9b86cb9f96f5f6c44.tar.gz
nng-86b4573c22af46582d5018f9b86cb9f96f5f6c44.tar.bz2
nng-86b4573c22af46582d5018f9b86cb9f96f5f6c44.zip
Add http server method for getting address
Diffstat (limited to 'docs')
-rw-r--r--docs/man/libnng.3.adoc1
-rw-r--r--docs/man/nng_http_server_get_addr.3http.adoc46
2 files changed, 47 insertions, 0 deletions
diff --git a/docs/man/libnng.3.adoc b/docs/man/libnng.3.adoc
index bf2a602d..35c9b0f4 100644
--- a/docs/man/libnng.3.adoc
+++ b/docs/man/libnng.3.adoc
@@ -410,6 +410,7 @@ These functions are intended for use with HTTP server applications.
|xref:nng_http_hijack.3http.adoc[nng_http_hijack()]|hijack HTTP server connection
|xref:nng_http_server_add_handler.3http.adoc[nng_http_server_add_handler()]|add HTTP server handler
|xref:nng_http_server_del_handler.3http.adoc[nng_http_server_del_handler()]|delete HTTP server handler
+|xref:nng_http_server_get_addr.3http.adoc[nng_http_server_get_addr()]|get HTTP server address
|xref:nng_http_server_get_tls.3http.adoc[nng_http_server_get_tls()]|get HTTP server TLS configuration
|xref:nng_http_server_hold.3http.adoc[nng_http_server_hold()]|get and hold HTTP server instance
|xref:nng_http_server_release.3http.adoc[nng_http_server_release()]|release HTTP server instance
diff --git a/docs/man/nng_http_server_get_addr.3http.adoc b/docs/man/nng_http_server_get_addr.3http.adoc
new file mode 100644
index 00000000..dc699014
--- /dev/null
+++ b/docs/man/nng_http_server_get_addr.3http.adoc
@@ -0,0 +1,46 @@
+= nng_http_server_get_addr(3http)
+//
+// 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_http_server_get_addr - get HTTP server address
+
+== SYNOPSIS
+
+[source, c]
+----
+#include <nng/nng.h>
+#include <nng/supplemental/http/http.h>
+
+int nng_http_server_get_addr(nng_http_server *server, nng_sockaddr *sap);
+----
+
+== DESCRIPTION
+
+`nng_http_server_get_addr()`::
+This function is used to retrieve an xref:nng_sockaddr.5.adoc[`nng_sockaddr`]
+into the value referenced by _sap_ for the server _server_.
+
+== RETURN VALUES
+
+This function returns 0 on success, and non-zero otherwise.
+
+== ERRORS
+
+`NNG_EINVAL`:: Either _server_ or _sap_ parameter is NULL.
+`NNG_ENOTSUP`:: HTTP not supported.
+
+
+== SEE ALSO
+
+[.text-left]
+xref:nng_sockaddr.5.adoc[nng_sockaddr(5)],
+xref:nng.7.adoc[nng(7)]