Add tcp keep alive and timeout.