rtmp v0.1.1 Rtmp.ServerSession.Handler
This module controls the process that controls 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
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
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_notification_process, event_receiver_module) :: :ok | :event_handler_already_set
Specifies the process id and function to use to raise event notifications
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
start_link(Rtmp.connection_id, Rtmp.ServerSession.Configuration.t) :: {:ok, session_handler}
Starts a new session handler process