diff options
| author | Robert Bielik <Robert.Bielik@dirac.com> | 2019-12-28 08:35:17 +0100 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2019-12-29 22:39:13 -0800 |
| commit | 86b4573c22af46582d5018f9b86cb9f96f5f6c44 (patch) | |
| tree | 8691841228a0a3bb20cdbe9227f1c4023804eb54 /include | |
| parent | 0cf84675edef0290a74dfd1e289c0b9e1bb3fb5c (diff) | |
| download | nng-86b4573c22af46582d5018f9b86cb9f96f5f6c44.tar.gz nng-86b4573c22af46582d5018f9b86cb9f96f5f6c44.tar.bz2 nng-86b4573c22af46582d5018f9b86cb9f96f5f6c44.zip | |
Add http server method for getting address
Diffstat (limited to 'include')
| -rw-r--r-- | include/nng/supplemental/http/http.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/nng/supplemental/http/http.h b/include/nng/supplemental/http/http.h index d0854981..e0cbd501 100644 --- a/include/nng/supplemental/http/http.h +++ b/include/nng/supplemental/http/http.h @@ -437,6 +437,11 @@ NNG_DECL int nng_http_server_set_tls( NNG_DECL int nng_http_server_get_tls( nng_http_server *, struct nng_tls_config **); +// nng_http_server_get_addr obtains the address with which the server was +// initialized or returns NNG_EINVAL. Useful for instance when the port has +// been automatically assigned. +NNG_DECL int nng_http_server_get_addr(nng_http_server *, nng_sockaddr *); + // nng_http_server_set_error_page sets a custom error page (HTML) content // to be sent for the given error code. This is used when the error is // generated internally by the framework, or when the application returns |
