Skip to content

Commit

Permalink
use : as splitter for ip/port
Browse files Browse the repository at this point in the history
  • Loading branch information
folkertvanheusden committed May 21, 2024
1 parent 810afdf commit 135a111
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ std::string get_endpoint_name(const int fd)
if (getpeername(fd, reinterpret_cast<sockaddr *>(&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<JsonDocument> deserialize_file(const std::string & filename)
Expand Down

0 comments on commit 135a111

Please sign in to comment.