ankh v0.7.2 Ankh.Transport behaviour

Transport behavior

Link to this section Summary

Types

t()

Transport reference

Callbacks

Accepts a client connection

Closes the connection

Connects to an host

Receives data

Sends data

Link to this section Types

Transport reference

Link to this section Callbacks

Link to this callback

accept(t, arg1, arg2)
accept(t(), Ankh.Connection.Receiver.t(), Keyword.t()) ::
  {:ok, t()} | {:error, term()}

Accepts a client connection

Link to this callback

close(t)
close(t()) :: :ok | {:error, term()}

Closes the connection

Link to this callback

connect(arg0, arg1, arg2)
connect(URI.t(), Ankh.Connection.Receiver.t(), Keyword.t()) ::
  {:ok, t()} | {:error, term()}

Connects to an host

Link to this callback

recv(t, integer)
recv(t(), integer()) :: {:ok, binary()} | {:error, term()}

Receives data

Link to this callback

send(t, iodata)
send(t(), iodata()) :: :ok | {:error, term()}

Sends data