Sprites.Proxy.Session (Sprites v0.2.0)
View SourceActive proxy session managed by a GenServer.
Summary
Functions
Returns a specification to start this module under a supervisor.
Gets the local address the proxy is listening on.
Starts a proxy session.
Stops a proxy session.
Types
@type t() :: %Sprites.Proxy.Session{ client: Sprites.Client.t(), listener: :gen_tcp.socket() | nil, local_port: non_neg_integer(), remote_host: String.t(), remote_port: non_neg_integer(), sprite_name: String.t() }
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec local_addr(pid()) :: {:ok, :inet.socket_address(), :inet.port_number()} | {:error, term()}
Gets the local address the proxy is listening on.
@spec start_link(Sprites.Client.t(), String.t(), Sprites.Proxy.PortMapping.t()) :: GenServer.on_start()
Starts a proxy session.
@spec stop(pid()) :: :ok
Stops a proxy session.