diff options
| author | Garrett D'Amore <garrett@damore.org> | 2025-10-09 07:54:52 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2025-10-09 19:01:15 -0700 |
| commit | f41cd6a9edf4b9a680194b3fb4378f39d1ed1f34 (patch) | |
| tree | 6179629b18645429e44e1440063363e975138923 /include | |
| parent | 9601545c27c948e9df530c5f0a912fb15cab9101 (diff) | |
| download | nng-f41cd6a9edf4b9a680194b3fb4378f39d1ed1f34.tar.gz nng-f41cd6a9edf4b9a680194b3fb4378f39d1ed1f34.tar.bz2 nng-f41cd6a9edf4b9a680194b3fb4378f39d1ed1f34.zip | |
fixes #1868 Add nng_http_[remote,local]_address APIs.
Diffstat (limited to 'include')
| -rw-r--r-- | include/nng/http.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/nng/http.h b/include/nng/http.h index 864dcc4f..0c1c39e0 100644 --- a/include/nng/http.h +++ b/include/nng/http.h @@ -180,6 +180,13 @@ NNG_DECL void nng_http_set_method(nng_http *, const char *); // nng_http_get_method returns the method. NNG_DECL const char *nng_http_get_method(nng_http *); +// nng_http_local_address obtains the local socket address for the connection. +NNG_DECL nng_err nng_http_local_address(nng_http *, nng_sockaddr *); + +// nng_http_remote_address obtains the remote socket address for the +// connection. +NNG_DECL nng_err nng_http_remote_address(nng_http *, nng_sockaddr *); + // These functions set (replacing any existing), or add (appending) // a header to either the request or response. Clients modify the request // headers, and servers (and callbacks on the server) modify response headers. |
