#[non_exhaustive]pub struct SrtSocketConfig {
pub handshake: HandshakeConfig,
pub io: IoConfig,
}Available on crate feature
tokio only.Expand description
Everything one SRT connection or listener is configured by: the handshake
this side advertises and the adapter’s timeouts and sizes. Every
SrtSocket and SrtListener constructor takes the config:
SrtSocketConfig::default() (a default HandshakeConfig and IoConfig)
or SrtSocketConfig::new(handshake).with_io(io) for its own values. It is
named for its role, not SrtClientConfig, because one config serves both
the caller (SrtSocket::connect) and the listener (SrtListener::bind).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.handshake: HandshakeConfigThe handshake values this side advertises.
io: IoConfigThe tokio adapter’s timeouts and sizes.
Implementations§
Source§impl SrtSocketConfig
impl SrtSocketConfig
Sourcepub fn new(handshake: HandshakeConfig) -> Self
pub fn new(handshake: HandshakeConfig) -> Self
A config with handshake and the default IoConfig.
Sourcepub fn with_handshake(self, handshake: HandshakeConfig) -> Self
pub fn with_handshake(self, handshake: HandshakeConfig) -> Self
Replace SrtSocketConfig::handshake.
Sourcepub fn with_io(self, io: IoConfig) -> Self
pub fn with_io(self, io: IoConfig) -> Self
Replace SrtSocketConfig::io.
Trait Implementations§
Source§impl Clone for SrtSocketConfig
impl Clone for SrtSocketConfig
Source§impl Debug for SrtSocketConfig
impl Debug for SrtSocketConfig
Source§impl Default for SrtSocketConfig
impl Default for SrtSocketConfig
Source§impl PartialEq for SrtSocketConfig
impl PartialEq for SrtSocketConfig
impl StructuralPartialEq for SrtSocketConfig
Auto Trait Implementations§
impl Forget for SrtSocketConfig
impl Freeze for SrtSocketConfig
impl Move for SrtSocketConfig
impl RefUnwindSafe for SrtSocketConfig
impl Send for SrtSocketConfig
impl Sync for SrtSocketConfig
impl Unpin for SrtSocketConfig
impl UnsafeUnpin for SrtSocketConfig
impl UnwindSafe for SrtSocketConfig
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