Using Connect and timeout func