rtmp v0.1.1 Rtmp.Protocol.Handler
This module controls the process that is responsible for serializing and deserializing RTMP chunk streams for a single peer in an RTMP connection. Input bytes come in, get deserialized into RTMP messages, and then get sent off to the specified session handling process. It can receive outbound RTMP messages that will then be serialized and sent off to the peer.
Due to the way RTMP header compression works, it is expected that the protocol handler will receive every input byte of network communication after a successful handshake, and it will be the only system serializing and sending outbound RTMP messages to the peer. If these assumptions are broken then there is a large chance the client or server will crash due to not being able to properly parse an RTMP chunk correctly.
Summary
Functions
Notifies the protocol handler of incoming binary coming in from the socket
Notifies the protocol handler of an rtmp message that should be serialized and sent to the peer
Specifies the session handler process and function to use to send deserialized RTMP messages to for the session handler
Starts a new protocol handler process
Types
Functions
Notifies the protocol handler of incoming binary coming in from the socket
send_message(protocol_handler, Rtmp.Protocol.DetailedMessage.t) :: :ok
Notifies the protocol handler of an rtmp message that should be serialized and sent to the peer.
set_session(protocol_handler, session_process, session_handler_module) :: :ok | :session_already_set
Specifies the session handler process and function to use to send deserialized RTMP messages to for the session handler
start_link(Rtmp.connection_id, socket, socket_transport_module) :: {:ok, protocol_handler}
Starts a new protocol handler process