Skip to content

Commit

Permalink
feat: access to m_szEndDebug
Browse files Browse the repository at this point in the history
  • Loading branch information
hax0r31337 committed Oct 15, 2024
1 parent a964473 commit a38765f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions gns/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,13 @@ impl GnsConnectionInfo {
self.0.m_eEndReason as u32
}

#[inline]
pub fn end_debug(&self) -> &str {
unsafe { CStr::from_ptr(self.0.m_szEndDebug.as_ptr()) }
.to_str()
.unwrap_or("")
}

#[inline]
pub fn remote_address(&self) -> Ipv6Addr {
Ipv6Addr::from(unsafe { self.0.m_addrRemote.__bindgen_anon_1.m_ipv6 })
Expand Down

0 comments on commit a38765f

Please sign in to comment.