rtmp v0.2.0 Rtmp.Handshake.OldHandshakeFormat

Functions to parse and validate RTMP handshakes as specified in the official RTMP specification.

This handshake format does NOT work for h.264 video.

Summary

Functions

Returns packets 0 and 1 to send to the peer

Validates if the passed in binary can be parsed using the old style handshake

Creates a new old handshake format instance

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

Types

state()
state() :: %Rtmp.Handshake.OldHandshakeFormat.State{bytes_to_send: term, current_stage: term, random_data: 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 old style handshake.

new()
new() :: state

Creates a new old 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