To make the tcp connections keepalive and better handle the timeout
of connections
con_timeout indicate the connection timeout and it is configurable
Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
Somtimes client connetions will not close therfore add a timeout. Add a
new timer that checks every 5s if we did not receive anything from a
client for (default) 60s. Can be configured via client_timeout.
Code is based on the work of ptpt52.
Signed-off-by: Nick Hainke <vincent@systemli.org>