Membrane.RTSP.Transport behaviour (Membrane RTSP v0.3.0) View Source
Behaviour describing Transport Layer for Real Time Streaming Protocol
Link to this section Summary
Callbacks
Callback used for cleaning up the transport layer when the session is closed.
Callback for executing requests with a given transport layer.
Callback for handling any transport-layer specific messages. Session will redirect any unknown messages to this callback.
Callback for initialization of transport layer implementation.
Functions
Link to this section Callbacks
Specs
close(state :: any()) :: :ok
Callback used for cleaning up the transport layer when the session is closed.
Specs
execute(request :: any(), state :: any(), options :: Keyword.t()) :: {:ok, reply :: any()} | {:error, reason :: any()}
Callback for executing requests with a given transport layer.
Specs
handle_info(msg :: any(), state :: any()) :: {action :: term(), state :: any()} | {action :: term(), reply :: any(), state :: any()}
Callback for handling any transport-layer specific messages. Session will redirect any unknown messages to this callback.
It is useful for eg. correctly handling :tcp_close message and similar.
Specs
Callback for initialization of transport layer implementation.
Upon successful initialization, the callback should return {:ok, state}. Value of state can be anything, but it is recommended that it contains some information that identifies a transport layer instance.