Skip to content

Commit 7116f82

Browse files
added: get_ip function in tcp connection
1 parent d84079c commit 7116f82

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/client/tcp_connection.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,12 @@ impl ClientConnection for ClientTCPConnection {
2727
timeout: timeout,
2828
}
2929
}
30-
30+
///implement get_ip
31+
/// returns IpAddr
32+
fn get_ip(&self) -> IpAddr {
33+
return self.server_addr.clone();
34+
}
35+
3136
/// creates socket tcp, sends query and receive response
3237
fn send(self, dns_query: DnsMessage) -> Result<Vec<u8>, ClientError>{
3338

0 commit comments

Comments
 (0)