ace v0.9.2 Ace.TCP

Serve application from TCP endpoint.

To start a TCP endpoint run start_link/2.

Link to this section Summary

Types

Reference to the endpoint

Option values used to start an endpoint

Configuration options used when starting and endpoint

Functions

Retrieve the port number for an endpoint

Start a new endpoint with the app behaviour

Link to this section Types

Link to this type endpoint()
endpoint() :: pid

Reference to the endpoint.

Link to this type option()
option ::
  {:name, GenServer.name} |
  {:acceptors, non_neg_integer} |
  {:port, :inet.port_number}

Option values used to start an endpoint.

Link to this type options()
options() :: [option]

Configuration options used when starting and endpoint.

Link to this section Functions

Link to this function port(endpoint)
port(endpoint) :: {:ok, :inet.port_number}

Retrieve the port number for an endpoint.

Link to this function start_link(arg, options)
start_link({module, term}, options) :: {:ok, endpoint}

Start a new endpoint with the app behaviour.

Options

  • :port - the port to run the server on. Defaults to port 8080.

  • :name - name to register the spawned endpoint under. The supported values are the same as GenServers.

  • :acceptors - The number of servers simultaneously waiting for a connection. Defaults to 50.