pub enum TransportStrategy {
Direct(SocketAddr),
Relay(SocketAddr),
Multicast(SocketAddr),
}
Expand description
Transport layer strategies.
Variants§
Direct(SocketAddr)
In straight-through mode, the sender creates an SRT server and the receiver connects directly to the sender via the SRT protocol.
For the sender, the network address is the address to which the SRT server binds and listens.
example: 0.0.0.0:8080
For the receiving end, the network address is the address of the SRT server on the sending end.
example: 192.168.1.100:8080
Relay(SocketAddr)
Forwarding mode, where the sender and receiver pass data through a relay server.
The network address is the address of the transit server.
Multicast(SocketAddr)
UDP multicast mode, where the sender sends multicast packets into the current network and the receiver processes the multicast packets.
The sender and receiver use the same address, which is a combination of multicast address + port.
example: 239.0.0.1:8080
Trait Implementations§
Source§impl Clone for TransportStrategy
impl Clone for TransportStrategy
Source§fn clone(&self) -> TransportStrategy
fn clone(&self) -> TransportStrategy
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for TransportStrategy
impl Debug for TransportStrategy
Source§impl<'de> Deserialize<'de> for TransportStrategy
impl<'de> Deserialize<'de> for TransportStrategy
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for TransportStrategy
impl Serialize for TransportStrategy
impl Copy for TransportStrategy
Auto Trait Implementations§
impl Freeze for TransportStrategy
impl RefUnwindSafe for TransportStrategy
impl Send for TransportStrategy
impl Sync for TransportStrategy
impl Unpin for TransportStrategy
impl UnwindSafe for TransportStrategy
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