View Source Mediasoup.Utility (mediasoup_elixir v0.14.4)

Utilities

Summary

Functions

Get listen ip from nodes. used in Router.pipe_producer_to_router for default implementation.

Get local ip from nodes. used in Router.pipe_producer_to_router for default implementation.

Functions

Link to this function

get_listen_ip(from_node, to_node)

View Source

Get listen ip from nodes. used in Router.pipe_producer_to_router for default implementation.

Returns {:ok, ipaddress}. When from_node and to_node is same, return {:ok, "127.0.0.1"}, Otherwise return {:ok, "0.0.0.0"}

Link to this function

get_remote_node_ip(from_node, to_node)

View Source
@spec get_remote_node_ip(node(), node()) ::
  {:ok, ipaddress :: String.t()} | {:error, reason :: term()}

Get local ip from nodes. used in Router.pipe_producer_to_router for default implementation.

Returns {:ok, ipaddress} | {:error, reason}.

  1. execute gethostname on remote(connection to) node
  2. execute getaddr by hostname on local(connection from) node