add support for connect_timeout parameter