NNG_HTTP_..._GET_ADDR(3http)

πŸ“¦ version 1.11, in alpine 3.24

✨ NNG_HTTP_..._GET_ADDR(3http) ✨

okay bestie, so this is the page for nng_http_server_get_addr from the NNG Reference Manual, section 3http β€” and no, the ... in the title is not me being dramatic, that's genuinely how the page is named πŸ’…


🌸 NAME 🌸

nng_http_server_get_addr β€” literally just get the HTTP server address πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <nng/nng.h>
#include <nng/supplemental/http/http.h>

int nng_http_server_get_addr(nng_http_server *server, nng_sockaddr *sap);

like, two includes, one function call, zero chaos. slay πŸ’–


πŸ’œ DESCRIPTION πŸ’œ

So, nng_http_server_get_addr() β€” here's the tea:

  • nng_http_server_get_addr() β€” this function is used to retrieve an nng_sockaddr into the value referenced by sap for the server server.

That's it, that's the whole vibe. You hand it a server, you hand it a sap, and it fills in the nng_sockaddr that sap points at. main character energy honestly πŸ‘‘


🌈 RETURN VALUES 🌈

This function returns 0 on success, and non-zero otherwise. so if you get 0, congrats bestie, you ate. anything else? that's a whole different story 😭


πŸ”₯ ERRORS πŸ”₯

  • NNG_EINVAL β€” either the server or sap parameter is NULL. yeah, like, don't do that πŸ™ˆ
  • NNG_ENOTSUP β€” HTTP is not supported. the library said "not me", and honestly? valid πŸ’€

🫢 SEE ALSO 🫢


⭐ quick vibe check: NNG_EINVAL = you passed a NULL in there somewhere, NNG_ENOTSUP = no HTTP for you. no cap, those are the only two listed. periodt.

that's the whole page, bestie β€” shipped with love from the NNG Reference Manual, dated 2026-01-13, and filed under NNG_HTTP_..._GET_ADDR(3http) πŸ§šπŸ’« go get those addresses. πŸ’…

πŸ“¦ where this page comes from