From 135a111bbf7c6fe4e93e520ccd52229f90deadb1 Mon Sep 17 00:00:00 2001 From: folkert van heusden Date: Tue, 21 May 2024 11:56:19 +0200 Subject: [PATCH] use : as splitter for ip/port --- utils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils.cpp b/utils.cpp index abcc548..f1b822d 100644 --- a/utils.cpp +++ b/utils.cpp @@ -271,7 +271,7 @@ std::string get_endpoint_name(const int fd) if (getpeername(fd, reinterpret_cast(&addr), &addr_len) == -1) return format("FAILED TO FIND NAME OF %d: %s", fd, strerror(errno)); - return std::string(inet_ntoa(addr.sin_addr)) + "." + format("%d", ntohs(addr.sin_port)); + return std::string(inet_ntoa(addr.sin_addr)) + ":" + format("%d", ntohs(addr.sin_port)); } std::optional deserialize_file(const std::string & filename)