ace v0.9.2 Ace.Server
Elixir.Ace.Server
manages a single client connection.
A server is started with an module to define behaviour and configuration as initial state.
See the README.md for a complete overview on how to make a server available.
The server process accepts as well as manages the connection. There is no separate acceptor process. This means that that is no need to switch the connections owning process. Several erlang servers do use separate acceptor pools.
Link to this section Summary
Functions
Manage a client connect with server
Start a new Elixir.Ace.Server
linked to the calling process
Link to this section Types
The configuration used to start each server.
A server configuration consists of behaviour, the module
, and state.
The module should implement the Ace.Application
behaviour.
Any value can be passed as the state.
The current state of an individual server process.
Link to this section Functions
accept_connection(server, {:tcp, :inet.socket}) :: {:ok, reference} when server: pid
Manage a client connect with server
Accept can only be called once for each server. After a connection has been closed the server will terminate.
Start a new Elixir.Ace.Server
linked to the calling process.
A server is started with an app to describe its behaviour and configuration for initial state.
The server process is returned immediatly. This is allow a supervisor to start several servers without waiting for connections.
To accept a connection accept_connection/2
must be called.
A provisioned server will remain in an awaiting state until accept is called.