acelyc111 commented on code in PR #1825:
URL:
https://github.com/apache/incubator-pegasus/pull/1825#discussion_r1445694147
##########
src/runtime/rpc/rpc_host_port.cpp:
##########
@@ -157,19 +157,28 @@ std::string host_port::to_string() const
case HOST_TYPE_IPV4:
return fmt::format("{}:{}", _host, _port);
case HOST_TYPE_GROUP:
- return fmt::format("address group {}", group_host_port()->name());
+ return fmt::format("host_port group {}", group_host_port()->name());
default:
- return "invalid address";
+ return "invalid host_port";
}
}
+// hostname has a maximum of 253 ASCII characters
+// uint_16 port maximum is 65535
+// 253 + 1(colon) + 5 = 259
+static __thread fixed_size_buffer_pool<8, 259> bf;
+const char *host_port::get_char_str() const
Review Comment:
I still doubt the necessarity of introducing it, what will happen if using:
```
fmt::printf("{}", to_std_string())
strcpy(dest, to_std_string().c_str())
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]