MLLP.Client.start_link
start_link
, go back to MLLP.Client module for more information.
start_link(address, port, options \\ [])
Specs
start_link( address :: ip_address(), port :: :inet.port_number(), options :: MLLP.ClientContract.options() ) :: {:ok, pid()}
Starts a new MLLP.Client.
MLLP.Client.start_link/4 will start a new MLLP.Client process.
This function will raise a ArgumentError
if an invalid ip_address()
is provided.
Options
:use_backoff
- Specify if an exponential backoff should be used for connection. When an attempt to establish a connection fails, either post-init or at some point during the life span of the client, the backoff value will determine how often to retry a reconnection. Starts at 1 second and increases exponentially until reachingbackoff_max_seconds
seconds. Defaults totrue
.:backoff_max_seconds
- Specify the max limit of seconds the backoff reconection attempt should take, defauls to 180 (3 mins).:auto_reconnect_interval
- Specify the interval between connection attempts. Specifically, if an attempt to establish a connection fails, either post-init or at some point during the life span of the client, the value of this option shall determine how often to retry a reconnection. Defaults to 1000 milliseconds. This option will only be used ifuse_backoff
is set tofalse
.:reply_timeout
- Optionally specify a timeout value for receiving a response. Must be a positive integer or:infinity
. Defaults to:infinity
.:socket_opts
- A list of socket options as supported by:gen_tcp
. Note that:binary
,:packet
, and:active
can not be overridden.:tls
- A list of tls options as supported by:ssl
. When using TLS it is highly recommended you set:verify
to:verify_peer
, select a CA trust store using the:cacertfile
or:cacerts
options. Additionally, further hardening can be achieved through other ssl options such as enabling certificate revocation via the:crl_check
and:crl_cache
options and customization of enabled protocols and cipher suites for your specific use-case. See:ssl
for details.