pub struct SrtHandshake {
pub version: u32,
pub encryption: u16,
pub initial_sequence: u32,
pub handshake_type: HandshakeType,
pub socket_id: u32,
pub cookie: u32,
}Available on crate features
ingest and srt only.Expand description
The fields of an SRT handshake this listener inspects.
Fields§
§version: u32Protocol version (4 for HSv4, 5 for HSv5).
encryption: u16Encryption field — non-zero means the caller wants an encrypted link, which this build rejects (see the module-level scope note).
initial_sequence: u32Initial packet sequence number.
handshake_type: HandshakeTypeThe handshake request type.
socket_id: u32The caller’s SRT socket id.
SYN cookie (0 on the caller’s induction request).
Implementations§
Source§impl SrtHandshake
impl SrtHandshake
Sourcepub fn parse(datagram: &[u8]) -> Option<SrtHandshake>
pub fn parse(datagram: &[u8]) -> Option<SrtHandshake>
Parse the handshake from a full control datagram. Returns None if the
datagram is too short to contain a handshake body.
Sourcepub fn wants_encryption(&self) -> bool
pub fn wants_encryption(&self) -> bool
Whether the caller requested an encrypted link (unsupported here).
Trait Implementations§
Source§impl Clone for SrtHandshake
impl Clone for SrtHandshake
Source§fn clone(&self) -> SrtHandshake
fn clone(&self) -> SrtHandshake
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 SrtHandshake
Source§impl Debug for SrtHandshake
impl Debug for SrtHandshake
impl Eq for SrtHandshake
Source§impl PartialEq for SrtHandshake
impl PartialEq for SrtHandshake
Source§fn eq(&self, other: &SrtHandshake) -> bool
fn eq(&self, other: &SrtHandshake) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for SrtHandshake
Auto Trait Implementations§
impl Freeze for SrtHandshake
impl RefUnwindSafe for SrtHandshake
impl Send for SrtHandshake
impl Sync for SrtHandshake
impl Unpin for SrtHandshake
impl UnsafeUnpin for SrtHandshake
impl UnwindSafe for SrtHandshake
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