pub struct StaticWebRtcCarrier {
pub stun: Vec<SocketAddr>,
pub bind: Option<SocketAddr>,
pub mapper: Arc<dyn SessionPortMapper>,
pub mapping_description: &'static str,
}Expand description
Carrier with fixed STUN servers and an optional port mapper (tests / simple hosts).
Fields§
§stun: Vec<SocketAddr>STUN addresses returned by WebRtcCarrier::stun_servers.
bind: Option<SocketAddr>Optional ICE UDP bind.
mapper: Arc<dyn SessionPortMapper>Port mapper (defaults to NoSessionPortMapper).
mapping_description: &'static strMapper description (e.g. "iroh-webrtc" / "p2p-webrtc").
Trait Implementations§
Source§impl Clone for StaticWebRtcCarrier
impl Clone for StaticWebRtcCarrier
Source§impl Default for StaticWebRtcCarrier
impl Default for StaticWebRtcCarrier
Source§impl WebRtcCarrier for StaticWebRtcCarrier
impl WebRtcCarrier for StaticWebRtcCarrier
Source§fn stun_servers<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Vec<SocketAddr>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn stun_servers<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Vec<SocketAddr>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
STUN server addresses used while gathering (no TURN).
Source§fn bind_addr(&self) -> Option<SocketAddr>
fn bind_addr(&self) -> Option<SocketAddr>
Optional forced bind for the answerer’s ICE UDP sockets.
Source§fn port_mapper(&self) -> Arc<dyn SessionPortMapper> ⓘ
fn port_mapper(&self) -> Arc<dyn SessionPortMapper> ⓘ
IPv4 session-port mapper (UPnP / carrier portmap). Default: unavailable.
Source§fn mapping_description(&self) -> &str
fn mapping_description(&self) -> &str
Description string passed to
SessionPortMapper::map.Source§fn bind_session<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_identity: &'life1 OpenOk,
_peer: [u8; 32],
_handle: &'life2 WebRtcHandle,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn bind_session<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_identity: &'life1 OpenOk,
_peer: [u8; 32],
_handle: &'life2 WebRtcHandle,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Called after the handle is created and before the answerer runs. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for StaticWebRtcCarrier
impl !UnwindSafe for StaticWebRtcCarrier
impl Forget for StaticWebRtcCarrier
impl Freeze for StaticWebRtcCarrier
impl Move for StaticWebRtcCarrier
impl Send for StaticWebRtcCarrier
impl Sync for StaticWebRtcCarrier
impl Unpin for StaticWebRtcCarrier
impl UnsafeUnpin for StaticWebRtcCarrier
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