add connect interface and timeout control