introduce keepalive option and make common socket options function

Signed-off-by: Andy Green <andy.green@linaro.org>
8 files changed