From b325ddacf02eac572177b632cfcbfd099bc9195b Mon Sep 17 00:00:00 2001 From: ty Date: Mon, 28 Oct 2024 16:09:23 -0400 Subject: [PATCH] update client_behaviour_spec --- lib/membrane_rtmp_plugin/rtmp_server.ex | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/lib/membrane_rtmp_plugin/rtmp_server.ex b/lib/membrane_rtmp_plugin/rtmp_server.ex index 19ce194..0639347 100644 --- a/lib/membrane_rtmp_plugin/rtmp_server.ex +++ b/lib/membrane_rtmp_plugin/rtmp_server.ex @@ -27,9 +27,8 @@ defmodule Membrane.RTMPServer do port: :inet.port_number(), use_ssl?: boolean(), name: atom() | nil, - handle_new_client: - (client_ref :: pid(), app :: String.t(), stream_key :: String.t() -> - client_behaviour_spec()), + handle_new_client: (client_ref :: pid(), app :: String.t(), stream_key :: String.t() -> + client_behaviour_spec()), client_timeout: Membrane.Time.t() ] @@ -46,7 +45,13 @@ defmodule Membrane.RTMPServer do an input argument of the `c:#{inspect(ClientHandler)}.handle_init/1`. Otherwise, an empty map is passed to the `c:#{inspect(ClientHandler)}.handle_init/1`. """ - @type client_behaviour_spec :: ClientHandler.t() | {ClientHandler.t(), opts :: any()} + + @type receiver_pid :: pid() | nil + + @type client_behaviour_spec :: + ClientHandler.t() + | {ClientHandler.t(), opts :: any()} + | {CLientHandler.t(), opts :: any(), receiver_pid} @type server_identifier :: pid() | atom()