Struct datachannel::RtcPeerConnection
source · [−]pub struct RtcPeerConnection<P> { /* private fields */ }
Implementations
sourceimpl<P> RtcPeerConnection<P>where
P: PeerConnectionHandler + Send,
P::DCH: DataChannelHandler + Send,
impl<P> RtcPeerConnection<P>where
P: PeerConnectionHandler + Send,
P::DCH: DataChannelHandler + Send,
pub fn new(config: &RtcConfig, pc_handler: P) -> Result<Box<Self>>
sourcepub fn create_data_channel<C>(
&mut self,
label: &str,
dc_handler: C
) -> Result<Box<RtcDataChannel<C>>>where
C: DataChannelHandler + Send,
pub fn create_data_channel<C>(
&mut self,
label: &str,
dc_handler: C
) -> Result<Box<RtcDataChannel<C>>>where
C: DataChannelHandler + Send,
Creates a boxed RtcDataChannel
.
pub fn create_data_channel_ex<C>(
&mut self,
label: &str,
dc_handler: C,
dc_init: &DataChannelInit
) -> Result<Box<RtcDataChannel<C>>>where
C: DataChannelHandler + Send,
sourcepub fn add_track<C>(
&mut self,
sdp_media: &SdpMedia,
t_handler: C
) -> Result<Box<RtcTrack<C>>>where
C: TrackHandler + Send,
pub fn add_track<C>(
&mut self,
sdp_media: &SdpMedia,
t_handler: C
) -> Result<Box<RtcTrack<C>>>where
C: TrackHandler + Send,
Creates a boxed RtcTrack
.
pub fn add_track_ex<C>(
&mut self,
t_init: &TrackInit,
t_handler: C
) -> Result<Box<RtcTrack<C>>>where
C: TrackHandler + Send,
pub fn set_local_description(&mut self, sdp_type: SdpType) -> Result<()>
pub fn set_remote_description(
&mut self,
sess_desc: &SessionDescription
) -> Result<()>
pub fn add_remote_candidate(&mut self, cand: &IceCandidate) -> Result<()>
pub fn local_description(&self) -> Option<SessionDescription>
pub fn remote_description(&self) -> Option<SessionDescription>
pub fn local_address(&self) -> Option<String>
pub fn remote_address(&self) -> Option<String>
pub fn selected_candidate_pair(&self) -> Option<CandidatePair>
Trait Implementations
Auto Trait Implementations
impl<P> !RefUnwindSafe for RtcPeerConnection<P>
impl<P> Send for RtcPeerConnection<P>where
P: Send,
impl<P> Sync for RtcPeerConnection<P>where
P: Sync,
impl<P> Unpin for RtcPeerConnection<P>where
P: Unpin,
impl<P> UnwindSafe for RtcPeerConnection<P>where
P: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more