Skip to main content

WebRtcSignaling

Trait WebRtcSignaling 

Source
pub trait WebRtcSignaling: Send + Sync {
    // Required method
    fn handle<'life0, 'life1, 'async_trait>(
        &'life0 self,
        identity: &'life1 OpenOk,
        peer: [u8; 32],
        send: BoxSend,
        recv: BoxRecv,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Carrier-owned WebRTC signaling for webrtc.signal/1.

The shared server has no carrier Connection type; when the carrier can answer WebRTC (iroh today), it passes Some into crate::serve and receives the signaling stream exactly as node-app-iroh’s device-session server does. When None, the server refuses with unsupported_transport.

Required Methods§

Source

fn handle<'life0, 'life1, 'async_trait>( &'life0 self, identity: &'life1 OpenOk, peer: [u8; 32], send: BoxSend, recv: BoxRecv, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Handle one webrtc.signal/1 stream on an opened session.

send/recv already peeked the method prefix; the body (SDP / ICE frames) starts at the next byte. Own the halves until the signaling session ends.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§