A supervised TCP acceptor for a single protocol.
On start it opens a listening socket on the configured port and spawns an
accept loop. Every accepted connection is handed to an unlinked process
running FakeRiak.Connection.serve/2 with the configured handler module, so a
misbehaving client can never take down the acceptor.
Options:
:name— registered name / logging label (usually the handler module):port— TCP port to listen on (0lets the OS pick a free port):handler— module implementingFakeRiak.Protocol:ip— interface address to bind (defaults to127.0.0.1)
Summary
Functions
Returns a specification to start this module under a supervisor.
Returns the actual port the listener is bound to (useful with port 0).
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
Returns the actual port the listener is bound to (useful with port 0).