[][src]Enum rml_rtmp::handshake::HandshakeErrorKind

pub enum HandshakeErrorKind {
    BadVersionId,
    NonZeroedTimeInPacket1,
    IncorrectPeerTime,
    IncorrectRandomData,
    HandshakeAlreadyCompleted,
    UnknownPacket1Format,
    InvalidP2Packet,
    Io(Error),
}

Enumeration that represents the various errors that can occur during the handshaking process

Variants

BadVersionId

The RTMP specification requires the first byte in the handshake process to start with a 3, so this error is encountered if any other value is in the first byte.

NonZeroedTimeInPacket1

The RTMP specification requires the 2nd set of 4 bytes to all be zeroes, so this error is encountered if any of those values are not zeros.

IncorrectPeerTime

This is encountered when the peer did not send the same timestamp in packet #2 that we sent them in our packet #1.

IncorrectRandomData

This is encountered when the peer did not send back the same random data in their packet number 2 that we sent them in our packet number 1.

HandshakeAlreadyCompleted

This is encountered if we try to keep progressing on a handshake handler that has already completed a successful handshake.

UnknownPacket1Format

The packet 1 we receive may be one of two formats (digest at position 8 or 772). There is no known way to know which one to expect, so both are tested for. This error is returned when packet 1 does not match either of the messages (and most likely is a bad handshake).

InvalidP2Packet

This occurs when the incoming p2 did not either contain an exact copy of the p1 we sent (old handshake) or the hmac signature did not match (digest handshake).

Io(Error)

This occurs when an IO error is encountered while reading the input.

Trait Implementations

impl From<HandshakeErrorKind> for HandshakeError
[src]

impl Debug for HandshakeErrorKind
[src]

impl Display for HandshakeErrorKind
[src]

impl Fail for HandshakeErrorKind
[src]

fn context<D>(self, context: D) -> Context<D> where
    D: Display + Send + Sync + 'static, 
[src]

Provides context for this failure. Read more

fn compat(self) -> Compat<Self>
[src]

Wraps this failure in a compatibility wrapper that implements std::error::Error. Read more

Auto Trait Implementations

Blanket Implementations

impl<T> From for T
[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> AsFail for T where
    T: Fail
[src]

impl<E> Fail for E where
    E: 'static + Error + Send + Sync
[src]

fn name(&self) -> Option<&str>
[src]

Returns the "name" of the error. Read more

fn cause(&self) -> Option<&(dyn Fail + 'static)>
[src]

Returns a reference to the underlying cause of this failure, if it is an error that wraps other errors. Read more

fn backtrace(&self) -> Option<&Backtrace>
[src]

Returns a reference to the Backtrace carried by this failure, if it carries one. Read more

fn context<D>(self, context: D) -> Context<D> where
    D: Display + Send + Sync + 'static, 
[src]

Provides context for this failure. Read more

fn compat(self) -> Compat<Self>
[src]

Wraps this failure in a compatibility wrapper that implements std::error::Error. Read more

impl<T> Same for T

type Output = T

Should always be Self