We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5a9d6ef commit 497aacaCopy full SHA for 497aaca
2 files changed
src/socket/simple_tcp/TCPClient.cpp
@@ -74,4 +74,12 @@ void TCPClient::close() {
74
::close(client_fd_);
75
client_fd_ = -1;
76
}
77
+}
78
+
79
+const std::string& TCPClient::getHost() const {
80
+ return host_;
81
82
83
+uint16_t TCPClient::getPort() const {
84
+ return port_;
85
src/socket/simple_tcp/TCPClient.h
@@ -11,6 +11,8 @@ class TCPClient {
11
void send(const std::string& msg);
12
std::string receive();
13
14
+ const std::string& getHost() const;
15
+ uint16_t getPort() const;
16
private:
17
std::string host_;
18
uint16_t port_;
0 commit comments