Add centralized IP/Peer formatting functions

This stops us from needing to manually check against ":" to
add brackets around IPv6 addresses everywhere.
This commit is contained in:
Matt Stancliff
2014-10-23 12:40:02 -04:00
parent 3cd36a4dd9
commit 2d90619f88
4 changed files with 37 additions and 0 deletions

View File

@ -91,6 +91,7 @@ sds sdscatrepr(sds s, const char *p, size_t len);
sds *sdssplitargs(const char *line, int *argc);
sds sdsmapchars(sds s, const char *from, const char *to, size_t setlen);
sds sdsjoin(char **argv, int argc, char *sep);
sds sdsformatip(char *ip, int port);
/* Low level functions exposed to the user API */
sds sdsMakeRoomFor(sds s, size_t addlen);