pub struct ControlPacket {
pub timestamp: TimeStamp,
pub dest_sockid: SocketId,
pub control_type: ControlTypes,
}
Expand description
A UDP packet carrying control information
ⓘ
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|1| Type | Reserved |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| | Additional Info |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Time Stamp |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Destination Socket ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| |
~ Control Information Field ~
| |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Fields§
§timestamp: TimeStamp
The timestamp, relative to the socket start time (wrapping every 2^32 microseconds)
dest_sockid: SocketId
The dest socket ID, used for multiplexing
control_type: ControlTypes
The extra data
Implementations§
Source§impl ControlPacket
impl ControlPacket
pub const HEADER_SIZE: usize = 44usize
Trait Implementations§
Source§impl Clone for ControlPacket
impl Clone for ControlPacket
Source§fn clone(&self) -> ControlPacket
fn clone(&self) -> ControlPacket
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 ControlPacket
impl Debug for ControlPacket
Source§impl From<ControlPacket> for Packet
impl From<ControlPacket> for Packet
Source§fn from(cp: ControlPacket) -> Self
fn from(cp: ControlPacket) -> Self
Converts to this type from the input type.
Source§impl PartialEq for ControlPacket
impl PartialEq for ControlPacket
impl Eq for ControlPacket
impl StructuralPartialEq for ControlPacket
Auto Trait Implementations§
impl Freeze for ControlPacket
impl RefUnwindSafe for ControlPacket
impl Send for ControlPacket
impl Sync for ControlPacket
impl Unpin for ControlPacket
impl UnwindSafe for ControlPacket
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.