search for: ssh_connect_timeout

Displaying 1 result from an estimated 1 matches for "ssh_connect_timeout".

2018 Feb 23
6
RFC 8305 Happy Eyeballs in OpenSSH
...y for how long to wait before + * starting the next connection attempt [...] recommended value for a + * default delay is 250 milliseconds. + */ +#define CONNECTION_ATTEMPT_DELAY 250 + static int -timeout_connect(int sockfd, const struct sockaddr *serv_addr, - socklen_t addrlen, int *timeoutp) +ssh_connect_timeout(struct timeval *tv, int timeout_ms) { - int optval = 0; - socklen_t optlen = sizeof(optval); + if (timeout_ms <= 0) + return 0; + ms_subtract_diff(tv, &timeout_ms); + return timeout_ms <= 0; +} - /* No timeout: just do a blocking connect() */ - if (*timeoutp <= 0) - return connect...