shadowsocks v0.5.0 Shadowsocks.Conn behaviour View Source

Link to this section Summary

Link to this section Functions

Link to this function connect!(arg, args) View Source
connect!({charlist() | tuple()}, map()) :: port()

connect to {addr, port} args conn config options

Link to this function init(parent, socket, args) View Source
Link to this function proxy_stream(is, os, pid, size, type) View Source
proxy_stream(
  port() | struct(),
  port() | struct(),
  pid(),
  integer(),
  :up | :down
) :: any()

make a proxy from is to os

is input stream os output stream size init data size (size will report to flow event) type :up or :down, use to report flow event

Link to this function proxy_stream(is, os, pid, size, type, who) View Source
Link to this function start_link(socket, args) View Source

Link to this section Callbacks

Link to this callback init(socket, encoder, parent, args) View Source
init(
  socket :: port(),
  encoder :: Shadowsocks.Encoder.t(),
  parent :: pid(),
  args :: map()
) :: any()

connection loop init