erps v0.3.3 Erps.Transport.Tls View Source

implements a two-way TLS transport strategy.

this transport is useful when you have trusted clients and servers that are authenticated against each other and must have an encrypted channel over WAN.

extra options:

Link to this section Summary

Functions

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

(server) a specialized function that generates a match function option used to verify that the incoming client is bound to a single ip address.

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

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

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, tls_opts!) View Source
handshake(:inet.socket(), keyword()) ::
  {:ok, Erps.Transport.Api.socket()} | {:error, any()}

(server) a specialized function that generates a match function option used to verify that the incoming client is bound to a single ip address.

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, via Erps.Transport.OneWayTls.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 :ssl.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 :ssl.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 :ssl.send/2.

Link to this function

upgrade!(sock, opts) View Source
upgrade!(socket(), keyword()) :: socket() | no_return()

Callback implementation for Erps.Transport.Api.upgrade!/2, via Erps.Transport.OneWayTls.upgrade!/2.