From f41cd6a9edf4b9a680194b3fb4378f39d1ed1f34 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Thu, 9 Oct 2025 07:54:52 -0700 Subject: fixes #1868 Add nng_http_[remote,local]_address APIs. --- include/nng/http.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include') 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. -- cgit v1.2.3-70-g09d2