Skip to content

Commit e9b66ea

Browse files
authored
Merge pull request #1005 from tomDev5/feature/listen-endpoint-getter
add a getter method for TCP listen_endpoint
2 parents fe0b4d1 + 632e164 commit e9b66ea

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/socket/tcp.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -793,6 +793,12 @@ impl<'a> Socket<'a> {
793793
self.hop_limit = hop_limit
794794
}
795795

796+
/// Return the listen endpoint
797+
#[inline]
798+
pub fn listen_endpoint(&self) -> IpListenEndpoint {
799+
self.listen_endpoint
800+
}
801+
796802
/// Return the local endpoint, or None if not connected.
797803
#[inline]
798804
pub fn local_endpoint(&self) -> Option<IpEndpoint> {

0 commit comments

Comments
 (0)