rtmp v0.2.0 Rtmp.ServerSession.Handler
This module controls the process that processes the business logic of a server in an RTMP connection.
The session handler can react to incoming RTMP input messages from the client by responding directly with RTMP output messages or by sending out event notifications for other processes to react to.
The session handler then has an API for other processes to proactively trigger business logic (such as accepting a connection request) and cause RTMP messages to be sent out to the connected client.
Summary
Functions
Attempts to accept a request with the specified id
Passes an incoming RTMP message to the session handler
Notifies the session handler of new input or output byte totals
Sends a ping request to the connected client
Forms an RTMP detailed message with the specified message contents to be sent to the client
Sends the client the initial RTMP messages allowing the client to send messages on stream id 0
Specifies the process id and function to use to raise event notifications
Specifies the process id and function to send outbound RTMP messages
Starts a new session handler process
Types
Functions
Attempts to accept a request with the specified id
handle_rtmp_input(session_handler, Rtmp.Protocol.DetailedMessage.t) :: :ok
Passes an incoming RTMP message to the session handler
notify_byte_count(Rtmp.Behaviours.SessionHandler.session_handler_pid, Rtmp.Behaviours.SessionHandler.io_count_direction, non_neg_integer) :: :ok
Notifies the session handler of new input or output byte totals
Sends a ping request to the connected client
send_rtmp_message(session_handler, Rtmp.deserialized_message, non_neg_integer, non_neg_integer | nil) :: :ok
Forms an RTMP detailed message with the specified message contents to be sent to the client
Sends the client the initial RTMP messages allowing the client to send messages on stream id 0
set_event_handler(session_handler, event_receiver_process, event_receiver_module) :: :ok | :event_handler_already_set
Specifies the process id and function to use to raise event notifications.
It is expected that the module passed in implements the Rtmp.Behaviours.EventReceiver
behaviour.
set_rtmp_output_handler(session_handler, rtmp_output_handler, protocol_handler_module) :: :ok | :output_handler_already_set
Specifies the process id and function to send outbound RTMP messages
It is expected that the module passed in implements the Rtmp.Behaviours.ProtocolHandler
behaviour.
start_link(Rtmp.connection_id, Rtmp.ServerSession.Configuration.t) :: {:ok, session_handler}
Starts a new session handler process