pub enum ConnInitMethod {
Listen,
Connect(SocketAddr),
Rendezvous(SocketAddr),
}Expand description
Describes how this SRT entity will connect to the other.
Variants§
Listen
Listens on the local socket, expecting there to be a Connect instance that eventually connects to this socket.
This almost certianly menas you should use it with SrtSocketBuilder::local_port,
As otherwise there is no way to know which port it will bind to.
Connect(SocketAddr)
Connect to a listening socket. It expects the listen socket to be on the SocketAddr provided.
Rendezvous(SocketAddr)
Connect to another Rendezvous connection. This is useful if both sides are behind a NAT. The SocketAddr
passed should be the public address and port of the other Rendezvous connection.
Trait Implementations§
Source§impl Clone for ConnInitMethod
impl Clone for ConnInitMethod
Source§fn clone(&self) -> ConnInitMethod
fn clone(&self) -> ConnInitMethod
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ConnInitMethod
Source§impl Debug for ConnInitMethod
impl Debug for ConnInitMethod
impl Eq for ConnInitMethod
Source§impl PartialEq for ConnInitMethod
impl PartialEq for ConnInitMethod
impl StructuralPartialEq for ConnInitMethod
Auto Trait Implementations§
impl Freeze for ConnInitMethod
impl RefUnwindSafe for ConnInitMethod
impl Send for ConnInitMethod
impl Sync for ConnInitMethod
impl Unpin for ConnInitMethod
impl UnsafeUnpin for ConnInitMethod
impl UnwindSafe for ConnInitMethod
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