From 86b4573c22af46582d5018f9b86cb9f96f5f6c44 Mon Sep 17 00:00:00 2001 From: Robert Bielik Date: Sat, 28 Dec 2019 08:35:17 +0100 Subject: Add http server method for getting address --- docs/man/libnng.3.adoc | 1 + docs/man/nng_http_server_get_addr.3http.adoc | 46 ++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 docs/man/nng_http_server_get_addr.3http.adoc (limited to 'docs') 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. +// Copyright 2018 Capitar IT Group BV +// +// 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 +#include + +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)] -- cgit v1.2.3-70-g09d2