There were hard-coded defaults and logging functions that worked fine for our internal usage but may need to be changed by others for their use case. This allows better configuration and customization to cover more use cases.
Overview
Add Options, InboundOptions. and OutboundOptions to allow configuring all of the options for each specific part of the connection.
Extract various magic values and default timeout settings into their respective option structs
Add in a generic logger interface type to allow outside loggers to handle the log messages
Add in new Dial and ListenAndServe methods that use their option structs and make the old functions call the new ones internally to maintain backwards compatibility.
Add in default stdout and nil loggers to be used for logging and maintaining existing outputs.
Context
There were hard-coded defaults and logging functions that worked fine for our internal usage but may need to be changed by others for their use case. This allows better configuration and customization to cover more use cases.
Overview