Beethoven.Core.Listener (Beethoven v0.2.3)

Genserver/TCP listener used to help Beethoven instances find each other.

Summary

Functions

TCP accept loop. When server gets a request

Starts server as a child of the root supervisor. Operation runs from a task to avoid hanging the caller waiting for init.

Starts server as a child of the root supervisor. Operation runs from a task to avoid hanging the caller waiting for init. (random number between 2.5-5.75 seconds)

Returns a specification to start this module under a supervisor.

Entry point for Supervisors. Links calling PID this this child pid.

Functions

accept(socket)

@spec accept(any()) :: :ok

TCP accept loop. When server gets a request

async_start()

@spec async_start() :: :ok

Starts server as a child of the root supervisor. Operation runs from a task to avoid hanging the caller waiting for init.

async_timed_start()

@spec async_timed_start() :: :ok

Starts server as a child of the root supervisor. Operation runs from a task to avoid hanging the caller waiting for init. (random number between 2.5-5.75 seconds)

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

start_link(args)

@spec start_link(any()) :: {:ok, pid()}

Entry point for Supervisors. Links calling PID this this child pid.