pub struct EstablishedTraversal {
pub session_id: String,
pub peer_npub: String,
pub remote_addr: SocketAddr,
pub socket: UdpSocket,
pub transport_name: Option<String>,
pub transport_config: Option<UdpConfig>,
}Expand description
Established UDP traversal ready to be handed into FIPS.
The socket must already be bound and must be the same socket used for the traversal runtime’s STUN and punch traffic so the NAT mapping is preserved.
Fields§
§session_id: StringRendezvous session identifier for logging/correlation.
peer_npub: StringRemote peer identity in npub form.
remote_addr: SocketAddrThe selected remote UDP endpoint to use for the FIPS handshake.
socket: UdpSocketThe live UDP socket carrying the established mapping.
transport_name: Option<String>Optional name for the adopted UDP transport.
transport_config: Option<UdpConfig>Optional UDP transport tuning overrides.
Implementations§
Source§impl EstablishedTraversal
impl EstablishedTraversal
Sourcepub fn new(
session_id: impl Into<String>,
peer_npub: impl Into<String>,
remote_addr: SocketAddr,
socket: UdpSocket,
) -> Self
pub fn new( session_id: impl Into<String>, peer_npub: impl Into<String>, remote_addr: SocketAddr, socket: UdpSocket, ) -> Self
Construct an established traversal handoff.
Sourcepub fn with_transport_name(self, name: impl Into<String>) -> Self
pub fn with_transport_name(self, name: impl Into<String>) -> Self
Attach an explicit transport name to the adopted UDP transport.
Sourcepub fn with_transport_config(self, config: UdpConfig) -> Self
pub fn with_transport_config(self, config: UdpConfig) -> Self
Override UDP transport tuning for the adopted socket.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for EstablishedTraversal
impl RefUnwindSafe for EstablishedTraversal
impl Send for EstablishedTraversal
impl Sync for EstablishedTraversal
impl Unpin for EstablishedTraversal
impl UnsafeUnpin for EstablishedTraversal
impl UnwindSafe for EstablishedTraversal
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more