NNG_TLS_CONFIG_SERVER_NAME(3tls)
π NAME π
nng_tls_config_server_name β bestie, this is the one that sets the remote server name π
It lives in the NNG Reference Manual, section 3tls, and yeah it's a manual page, but like... a fun one? Okay let's go β¨
πΈ SYNOPSIS πΈ
#include <nng/nng.h>
#include <nng/supplemental/tls/tls.h>
int nng_tls_config_server_name(nng_tls_config *cfg, const char *name);
β¨ DESCRIPTION β¨
okay so here's the tea β β nng_tls_config_server_name() configures the remote server name that a client is gonna use when it connects to a server. Like, this is the name the client walks up to the server wearing π«Ά
And what does it actually do with that name? Two things, no cap:
- that
nameyou supply gets used when comparing the identity in the server's certificate π (so it's the thing your cert has to match up to) - and furthermore, when Server Name Indication (SNI) is in play, that name may be sent over to the server as a hint β a little "hey bestie, use this one please" π β telling it which of several possible certificates should be used
π Tip: this function is only useful in configuring client behavior. Server-side? Not your moment, babe.
π RETURN VALUES π
Slays when it works: returns 0 on success, and non-zero otherwise. That's it, that's the vibe check π
π ERRORS π
NNG_ENOMEMβ insufficient memory is available π like the system literally cannot right nowNNG_EBUSYβ the configurationcfgis already in use, and cannot be modified π she's busy, she's booked, she's not taking edits rn
π¦ SEE ALSO π¦
and that's the whole page!! β¨ this came out of the NNG Reference Manual, dated 2026-06-30 π β with love from the NNG girlies, mwah π«Άππ
π¦ where this page comes from
- ubuntu stonking: libnng-dev 1.12.0-1 Β· MIT OR Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms