Skip to main content

IceTransport

Struct IceTransport 

Source
pub struct IceTransport { /* private fields */ }

Implementations§

Source§

impl IceTransport

Source

pub fn new(guard: Rc<dyn NetGate>, io: Rc<dyn NetIo>) -> Result<Rc<Self>, Error>

A transport with fresh local ICE parameters (RFC 8445 section 5.3: at least 24 bits of ufrag and 128 of password, which the agent generates), gathering nothing until gather().

Source

pub fn local_parameters(&self) -> (String, String)

getLocalParameters(): (usernameFragment, password).

Source

pub fn gather(self: &Rc<Self>, relay_only: bool) -> Result<(), Error>

gather(): binds a socket per host address and queues each host candidate, then the end of gathering. relay_only (gatherPolicy: "relay") gathers no host candidate.

Source

pub fn start( self: &Rc<Self>, ufrag: String, pwd: String, controlling: bool, ) -> Result<(), Error>

start(): the remote ICE parameters and the role. A later call with other parameters is an ICE restart of the remote side: the remote candidates are flushed (W3C webrtc-ice start() step “flush”).

Source

pub fn add_remote_candidate( self: &Rc<Self>, candidate: &str, ) -> Result<(), Error>

addRemoteCandidate(): a candidate-attribute value (candidate:...).

Source

pub fn selected_pair(&self) -> Option<SelectedPair>

getSelectedCandidatePair().

Source

pub fn stop(&self)

stop(): closes the agent and the sockets, for good.

Source

pub async fn next_events(&self) -> Option<Vec<IceEvent>>

Auto Trait Implementations§

§

impl !Freeze for IceTransport

§

impl !RefUnwindSafe for IceTransport

§

impl !Send for IceTransport

§

impl !Sync for IceTransport

§

impl !UnwindSafe for IceTransport

§

impl Forget for IceTransport

§

impl Move for IceTransport

§

impl Unpin for IceTransport
where Arc<dyn RTCCryptoProvider>: Unpin, *const u8 is !null: Unpin, Box<RestartUndo>: Unpin, *mut Shared: Unpin, Arc<Mutex<Bucket>>: Unpin, Arc<dyn Fn(SocketAddr) -> bool + Sync + Send>: Unpin, Arc<dyn Fn(SocketAddr, AddressDirection, AddressPurpose) -> bool + Sync + Send>: Unpin, Arc<PacingGroup>: Unpin, Box<Candidate>: Unpin, Rc<UdpSocket>: Unpin, Arc<Chan<Datagram, Semaphore>>: Unpin, Receiver<Datagram>: Unpin, Rc<GateCache>: Unpin, Rc<dyn NetIo>: Unpin, Align8<usize>: Unpin, Align4<u32>: Unpin, Align1<u8>: Unpin, *const Waiter is !null: Unpin, Arc<TreeNode>: Unpin,

§

impl UnsafeUnpin for IceTransport
where *const ArcInner<dyn RTCCryptoProvider> is !null: UnsafeUnpin, PhantomData<ArcInner<dyn RTCCryptoProvider>>: UnsafeUnpin, *const u8 is !null: UnsafeUnpin, PhantomData<u8>: UnsafeUnpin, PhantomData<Candidate>: UnsafeUnpin, PhantomData<CandidatePair>: UnsafeUnpin, PhantomData<usize>: UnsafeUnpin, PhantomData<PreviousConsentRequest>: UnsafeUnpin, *const RestartUndo is !null: UnsafeUnpin, PhantomData<RestartUndo>: UnsafeUnpin, PhantomData<BindingRequest>: UnsafeUnpin, PhantomData<(usize, usize)>: UnsafeUnpin, PhantomData<UnpairedRemote>: UnsafeUnpin, PhantomData<EarlyRequest>: UnsafeUnpin, PhantomData<String>: UnsafeUnpin, *const ArcInner<Mutex<Bucket>> is !null: UnsafeUnpin, PhantomData<ArcInner<Mutex<Bucket>>>: UnsafeUnpin, PhantomData<(IpAddr, u8)>: UnsafeUnpin, PhantomData<LocalRecord>: UnsafeUnpin, PhantomData<Goodbye>: UnsafeUnpin, PhantomData<Instant>: UnsafeUnpin, PhantomData<Query>: UnsafeUnpin, PhantomData<Cached>: UnsafeUnpin, PhantomData<Reconfirm>: UnsafeUnpin, PhantomData<TransportMessage<BytesMut>>: UnsafeUnpin, PhantomData<MdnsEvent>: UnsafeUnpin, PhantomData<(u64, Candidate)>: UnsafeUnpin, PhantomData<(IpAddr, String)>: UnsafeUnpin, PhantomData<IpAddr>: UnsafeUnpin, PhantomData<(IpAddr, u64)>: UnsafeUnpin, PhantomData<Ipv6Addr>: UnsafeUnpin, PhantomData<CandidateType>: UnsafeUnpin, PhantomData<NetworkType>: UnsafeUnpin, PhantomData<Url>: UnsafeUnpin, *const ArcInner<dyn Fn(SocketAddr) -> bool + Sync + Send> is !null: UnsafeUnpin, PhantomData<ArcInner<dyn Fn(SocketAddr) -> bool + Sync + Send>>: UnsafeUnpin, *const ArcInner<dyn Fn(SocketAddr, AddressDirection, AddressPurpose) -> bool + Sync + Send> is !null: UnsafeUnpin, PhantomData<ArcInner<dyn Fn(SocketAddr, AddressDirection, AddressPurpose) -> bool + Sync + Send>>: UnsafeUnpin, *const ArcInner<PacingGroup> is !null: UnsafeUnpin, PhantomData<ArcInner<PacingGroup>>: UnsafeUnpin, PhantomData<(IpAddr, IpAddr)>: UnsafeUnpin, PhantomData<TaggedEvent>: UnsafeUnpin, PhantomData<Endpoint>: UnsafeUnpin, PhantomData<IceEvent>: UnsafeUnpin, PhantomData<(SocketAddr, ())>: UnsafeUnpin, *const ArcInner<Chan<Datagram, Semaphore>> is !null: UnsafeUnpin, PhantomData<ArcInner<Chan<Datagram, Semaphore>>>: UnsafeUnpin, *const RcInner<GateCache> is !null: UnsafeUnpin, PhantomData<RcInner<GateCache>>: UnsafeUnpin, *const RcInner<dyn NetIo> is !null: UnsafeUnpin, PhantomData<RcInner<dyn NetIo>>: UnsafeUnpin, Align8<usize>: UnsafeUnpin, Align4<u32>: UnsafeUnpin, Align1<u8>: UnsafeUnpin, *const Waiter is !null: UnsafeUnpin, *const ArcInner<TreeNode> is !null: UnsafeUnpin, PhantomData<ArcInner<TreeNode>>: UnsafeUnpin,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> ArchivePointee for T

Source§

type ArchivedMetadata = ()

The archived version of the pointer metadata for this type.
Source§

fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata

Converts some archived metadata to the pointer metadata for itself.
Source§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

Source§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

Source§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

Source§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> LayoutRaw for T

Source§

fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>

Returns the layout of the type.
Source§

impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
where T: SharedNiching<N1, N2>, N1: Niching<T>, N2: Niching<T>,

Source§

unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool

Returns whether the given value has been niched. Read more
Source§

fn resolve_niched(out: Place<NichedOption<T, N1>>)

Writes data to out indicating that a T is niched.
Source§

impl<T> Pointee for T

Source§

type Metadata = ()

The metadata type for pointers and references to this type.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.