tortoise v0.10.0 Tortoise.Transport behaviour 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
Functions
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
Link to this section Types
Link to this section Functions
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.
Link to this section Callbacks
Link to this callback
peername(socket)
View Source
peername(socket()) :: {:ok, {:inet.ip_address(), :inet.port_number()}} | {:error, atom()}
Link to this callback
recv(socket, non_neg_integer, timeout)
View Source
recv(socket(), non_neg_integer(), timeout()) :: {:ok, any()} | {:error, :closed | :timeout | atom()}
Link to this callback
sockname(socket)
View Source
sockname(socket()) :: {:ok, {:inet.ip_address(), :inet.port_number()}} | {:error, atom()}