rtmp v0.2.0 Rtmp.Handshake.DigestHandshakeFormat

Functions to parse and validate RTMP handshakes based on flash client versions and SHA digests. This handshake is required for supporting H.264 video.

Since no documentation of this handshake publicly exists from Adobe, this was created by referencing https://www.cs.cmu.edu/~dst/Adobe/Gallery/RTMPE.txt

Summary

Functions

Returns packets 0 and 1 to send to the peer

Validates if the passed in binary can be parsed using the digest handshake

Creates a new digest handshake format instance

Attempts to proceed with the handshake process with the passed in bytes

Types

state()
state() :: %Rtmp.Handshake.DigestHandshakeFormat.State{bytes_to_send: term, current_stage: term, is_server: term, received_start_time: term, unparsed_binary: term}

Functions

create_p0_and_p1_to_send(state)
create_p0_and_p1_to_send(state) :: {state, binary}

Returns packets 0 and 1 to send to the peer

is_valid_format(binary)
is_valid_format(binary) :: :unknown | :yes | :no

Validates if the passed in binary can be parsed using the digest handshake.

new()
new() :: state

Creates a new digest handshake format instance

process_bytes(state, binary)
process_bytes(state, binary) :: {state, Rtmp.Handshake.process_result}

Attempts to proceed with the handshake process with the passed in bytes