Membrane.RTSP.Session (Membrane RTSP v0.2.0) View Source

This module represents an active Session.

Link to this section Summary

Link to this section Types

Specs

t() :: %Membrane.RTSP.Session{container: pid(), manager: pid()}

Link to this section Functions

Link to this function

close(supervisor, session)

View Source

Specs

close(pid(), t()) :: :ok | {:error, atom()}

Closes open Session that was started using Session.new/4.

Link to this function

new(supervisor, url, transport \\ Transport.TCPSocket, options \\ [])

View Source

Specs

new(pid(), binary(), module(), Keyword.t()) ::
  :ignore | {:error, atom()} | {:ok, t()}

Starts a Session under a DynamicSupervisor.

Link to this function

request(session, method, headers \\ [], body \\ "", path \\ nil)

View Source

Specs

Executes the request on a given session.

Before execution populates with a default headers setting Session and User-Agent header. If the URI contains credentials they will also be added unless Authorization header is present in request.

Link to this function

start_link(url, transport \\ Transport.TCPSocket, options \\ [])

View Source

Start and links a Session.

If an error will occur during startup, an exit signal will be sent. Session started this way can be stopped by calling Supervisor.stop/3.