pub trait RelayedTransport: Send + Sync {
// Required method
fn open_relayed<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
target_peer: &'life1 str,
network_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<SocketAddr, String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
}Expand description
Abstraction over the relay data plane: open a stream to target_peer whose bytes are
proxied THROUGH the relay (RLY-002). This is the tier-6 TURN-like fallback — distinct from the
tier-5 HolePunchCoordinator, which only signals.
Returns the relay endpoint the data flows over (for observability — the mTLS session then runs
over that tunnel). Err = the relay could not open the forwarding channel (peer offline / relay
down / disabled).
Required Methods§
Sourcefn open_relayed<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
target_peer: &'life1 str,
network_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<SocketAddr, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn open_relayed<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
target_peer: &'life1 str,
network_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<SocketAddr, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Open a relay-proxied data channel to target_peer on network_id. Returns the relay’s
endpoint address (the data path). Err = could not establish the tunnel.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".