pub struct Version(/* private fields */);
Expand description
Bytes to indicate Flash Player version/Flash Media Server version.
This is used for indicating whether doing handshake with HMAC-SHA256 digest/signature. If you do handshake with HMAC-SHA256 as a client, set major version and above 9. If you do it as a server, set major version and above 3. If otherwise, set major version below 9/3, or you can set 0.
Because of handshake specification, note any value above 0xff
cannot set as a version. Such as a last byte of Flash Player version.
Implementations§
Source§impl Version
impl Version
Sourcepub const LATEST_CLIENT: Self = _
pub const LATEST_CLIENT: Self = _
The latest version of Flash Player.
Sourcepub const LATEST_SERVER: Self = _
pub const LATEST_SERVER: Self = _
The latest version of Flash Media Server.
Sourcepub fn get_major_version(&self) -> u8
pub fn get_major_version(&self) -> u8
Gets a number of major version either Flash Player or Flash Media Server.
§Examples
use sheave_core::handshake::Version;
assert_eq!(0, Version::UNSIGNED.get_major_version());
assert_eq!(32, Version::LATEST_CLIENT.get_major_version());
assert_eq!(5, Version::LATEST_SERVER.get_major_version())
The well-known RTMP applications check just this version to decide whether they do handshake with HMAC-SHA256.
Trait Implementations§
impl Copy for Version
impl Eq for Version
impl StructuralPartialEq for Version
Auto Trait Implementations§
impl Freeze for Version
impl RefUnwindSafe for Version
impl Send for Version
impl Sync for Version
impl Unpin for Version
impl UnwindSafe for Version
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