NNG_HTTP_CLIENT_GET_TLS(3http)

πŸ“¦ version 1.11, in alpine 3.24

🌸 NAME 🌸

nng_http_client_get_tls β€” get HTTP client TLS configuration.

Okay so this is the NNG_HTTP_CLIENT_GET_TLS(3http) page from the NNG Reference Manual, and it's literally about grabbing the TLS config off an HTTP client. Iconic. πŸ’…

✨ SYNOPSIS ✨

You gotta include these first, bestie:

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

int nng_http_client_get_tls(nng_http_client *client, nng_tls_config **cfgp);

πŸ¦‹ DESCRIPTION πŸ¦‹

The nng_http_client_get_tls() function obtains the TLS configuration of client and saves a pointer to it in the address referenced by cfgp.

The object comes back with an extra hold placed on it on behalf of the caller β€” that's the nng_tls_config_hold() situation, iykyk. The caller should free this hold by calling nng_tls_config_free() when they're done with the TLS configuration. No leaking, bestie. 🫢

πŸ’– RETURN VALUES πŸ’–

This function returns 0 on success, and non-zero otherwise.

πŸ”₯ ERRORS πŸ”₯

  • NNG_EINVAL β€” TLS not configured on client.
  • NNG_ENOMEM β€” Insufficient free memory exists.
  • NNG_ENOTSUP β€” Either HTTP or TLS not supported.

🌈 SEE ALSO 🌈


πŸŽ€ That's the whole page, bestie. It's from the NNG Reference Manual, dated 2026-01-13, and the page is NNG_HTTP_CLIENT_GET_TLS(3http) β€” the footer shows it as NNG_HTTP_...NT_GET_TLS(3http). Periodt. πŸ’…
πŸ“¦ where this page comes from