Tortoise311.Transport behaviour (tortoise311 v0.11.1) View Source
Abstraction for working with network connections; this is done to
normalize the :ssl
and :gen_tcp
modules, so they get a similar
interface.
This work has been heavily inspired by the Ranch project by NineNines.
Link to this section Summary
Link to this section Types
Link to this section Callbacks
Specs
Specs
Specs
close(socket()) :: :ok
Specs
Specs
Specs
Specs
Specs
Specs
Specs
Specs
peername(socket()) :: {:ok, {:inet.ip_address(), :inet.port_number()}} | {:error, atom()}
Specs
recv(socket(), non_neg_integer(), timeout()) :: {:ok, any()} | {:error, :closed | :timeout | atom()}
Specs
Specs
Specs
Specs
sockname(socket()) :: {:ok, {:inet.ip_address(), :inet.port_number()}} | {:error, atom()}
Link to this section Functions
Specs
Create a new Transport specification used by the Connection process to log on to the MQTT server. This allow us to filter the options passed to the connection type, and guide the user to connect to the individual transport type.