aboutsummaryrefslogtreecommitdiff
path: root/gmid.h
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2024-05-29 08:03:59 +0000
committerOmar Polo <op@omarpolo.com>2024-05-29 08:03:59 +0000
commitcd12ad1132f5560e11c7f1e6f2d436edafbd2641 (patch)
tree06b0dd0e827f4b9b43061a84041789d6cddfee4a /gmid.h
parentb2782022c92840866f5c97f053b7f0ba881fd41c (diff)
pretty-print the socket address at configuration parsing time
saves a getnameinfo(NI_NUMERICHOST) at runtime, even if it's pretty cheap.
Diffstat (limited to 'gmid.h')
-rw-r--r--gmid.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/gmid.h b/gmid.h
index d098fd4..21d793c 100644
--- a/gmid.h
+++ b/gmid.h
@@ -114,6 +114,9 @@ struct address {
socklen_t slen;
int16_t port;
+ /* pretty-printed version of `ss' */
+ char pp[NI_MAXHOST];
+
/* used in the server */
struct conf *conf;
int sock;