View Source Membrane.RTMP.Source.SslServer (Membrane RTMP plugin v0.13.1)
A simple ssl server, which handles each new incoming connection.
The socket_handler function passed inside the options should take the socket returned by :ssl.handshake/1
and return {:ok, pid}, where the pid describes a process, which will be interacting with the socket.
Membrane.RTMP.Source.SslServer will grant that process control over the socket via :ssl.controlling_process/2.
Link to this section Summary
Types
Defines options for the SSL server.
The listen_options are passed to the :ssl.listen/2 function.
The socket_handler is a function that takes socket returned by :gen_tcp.accept/1 and returns the pid of a process,
which will be interacting with the socket. SslServer will grant that process control over the socket via :ssl.controlling_process/2.
Functions
Returns a specification to start this module under a supervisor.
Link to this section Types
@type t() :: %Membrane.RTMP.Source.SslServer{ listen_options: [:inet.inet_backend() | :ssl.tls_server_option()], parent: pid(), port: :inet.port_number(), socket_handler: (:ssl.sslsocket() -> {:ok, pid()} | {:error, reason :: any()}) }
Defines options for the SSL server.
The listen_options are passed to the :ssl.listen/2 function.
The socket_handler is a function that takes socket returned by :gen_tcp.accept/1 and returns the pid of a process,
which will be interacting with the socket. SslServer will grant that process control over the socket via :ssl.controlling_process/2.
Link to this section Functions
Returns a specification to start this module under a supervisor.
arg is passed as the argument to Task.start_link/1 in the :start field
of the spec.
For more information, see the Supervisor module,
the Supervisor.child_spec/2 function and the Supervisor.child_spec/0 type.
@spec run(t()) :: nil