19 Message(std::string ip, uint16_t port, std::string message)
20 : ip_(std::move(ip)), port_(port), message_(std::move(message)){};
22 Message(
const std::string &endpoint, std::string message)
23 : ip_(endpoint.substr(0, endpoint.find(
":"))),
24 port_(std::stoi(endpoint.substr(endpoint.find(
":") + 1, endpoint.size()))),
25 message_(std::move(message)) {}
31 bool isEmpty()
const {
return ip_.empty() || message_.empty(); }
43 std::string
getIp()
const {
return ip_; }
49 uint16_t
getPort()
const {
return port_; }
54 std::string message_{};