FixAlchemy.Server.Acceptor (FIXAlchemy v0.2.4)

View Source

Owns an acceptor's listening socket and turns each connection into a session.

Accepting blocks, so it happens in a linked process that hands the socket back and exits. This process then starts a FixAlchemy.Server.Session under the server's DynamicSupervisor, transfers socket ownership to it, and waits for the next connection. A session that dies takes only its own connection with it.

A failed TLS handshake, a peer that aborts mid-accept, a session that fails to start, and a crash in the accepting task are each logged, and accepting continues. The listener stops when its own socket closes.

Started by FixAlchemy.Server; it holds no configuration of its own.

Summary

Functions

Returns a specification to start this module under a supervisor.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

start_link(opts)

@spec start_link(keyword()) :: GenServer.on_start()