erps v0.3.3 Erps.Transport.Tcp View Source

implements a tcp transport strategy.

Link to this section Summary

Functions

Callback implementation for Erps.Transport.Api.accept/2.

upgrades the socket to active: true. Does not request the client-side for an upgrade to an authenticated or encrypted channel.

Callback implementation for Erps.Transport.Api.listen/2.

upgrades the socket to active: true. Does not upgrade to an authenticated or encrypted channel.

Link to this section Types

Link to this section Functions

Link to this function

accept(sock, timeout) View Source
accept(socket(), timeout()) :: {:ok, socket()} | {:error, term()}

Callback implementation for Erps.Transport.Api.accept/2.

Link to this function

connect(host, port, opts) View Source
connect(term(), :inet.port_number(), keyword()) ::
  {:ok, socket()} | {:error, term()}

Callback implementation for Erps.Transport.Api.connect/3.

Link to this function

handshake(socket, opts) View Source
handshake(:inet.socket(), keyword()) :: {:ok, Erps.Transport.Api.socket()}

upgrades the socket to active: true. Does not request the client-side for an upgrade to an authenticated or encrypted channel.

Callback implementation for Erps.Transport.Api.upgrade!/2.

Link to this function

listen(port, opts) View Source
listen(:inet.port_number(), keyword()) :: {:ok, socket()} | {:error, term()}

Callback implementation for Erps.Transport.Api.listen/2.

Link to this function

recv(sock, length) View Source
recv(socket(), non_neg_integer()) :: {:ok, binary()} | {:error, term()}

Callback implementation for Erps.Transport.Api.recv/2, via :gen_tcp.recv/2.

Link to this function

recv(sock, length, timeout) View Source
recv(socket(), non_neg_integer(), timeout()) ::
  {:ok, binary()} | {:error, term()}

Callback implementation for Erps.Transport.Api.recv/3, via :gen_tcp.recv/3.

Link to this function

send(sock, content) View Source
send(socket(), iodata()) :: :ok | {:error, term()}

Callback implementation for Erps.Transport.Api.send/2, via :gen_tcp.send/2

upgrades the socket to active: true. Does not upgrade to an authenticated or encrypted channel.

Callback implementation for Erps.Transport.Api.upgrade!/2.