Minimal RTSP/1.0 client for the AirPlay/RAOP control plane.
RTSP looks like HTTP: METHOD url RTSP/1.0\r\n + headers + blank line + body.
This module owns one TCP connection to the receiver and does synchronous
request/response with an incrementing CSeq. Header set + behaviour matches a sender
posing as iTunes/12.6 — see the protocol notes.
Summary
Functions
Open the RTSP TCP connection and seed the random per-session identifiers.
Send an RTSP request and read the response. method like "OPTIONS"; path
defaults to the session URL (pass "*" for OPTIONS). headers is a keyword/list
of {name, value}. Returns {:ok, status, resp_headers_map, body, state}.
Types
Functions
@spec connect(:inet.ip_address() | String.t(), :inet.port_number()) :: {:ok, t()} | {:error, term()}
Open the RTSP TCP connection and seed the random per-session identifiers.
@spec request(t(), String.t(), keyword() | list(), binary(), String.t() | nil) :: {:ok, non_neg_integer(), map(), binary(), t()} | {:error, term()}
Send an RTSP request and read the response. method like "OPTIONS"; path
defaults to the session URL (pass "*" for OPTIONS). headers is a keyword/list
of {name, value}. Returns {:ok, status, resp_headers_map, body, state}.