connection with timeout option