Skip to content

Commit

Permalink
Merge pull request #1005 from tomDev5/feature/listen-endpoint-getter
Browse files Browse the repository at this point in the history
add a getter method for TCP listen_endpoint
  • Loading branch information
Dirbaio authored Oct 23, 2024
2 parents fe0b4d1 + 632e164 commit e9b66ea
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/socket/tcp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -793,6 +793,12 @@ impl<'a> Socket<'a> {
self.hop_limit = hop_limit
}

/// Return the listen endpoint
#[inline]
pub fn listen_endpoint(&self) -> IpListenEndpoint {
self.listen_endpoint
}

/// Return the local endpoint, or None if not connected.
#[inline]
pub fn local_endpoint(&self) -> Option<IpEndpoint> {
Expand Down

0 comments on commit e9b66ea

Please sign in to comment.