using setTcpKeepAlive if possible.