| 208 | |
| 209 | |
| 210 | int ConnectD(TCont* cont, TSocketHolder& s, const struct addrinfo& ai, TInstant deadline) noexcept { |
| 211 | TSocketHolder res(Socket(ai)); |
| 212 | |
| 213 | if (res.Closed()) { |
| 214 | return LastSystemError(); |
| 215 | } |
| 216 | |
| 217 | const int ret = ConnectD(cont, res, ai.ai_addr, (socklen_t) ai.ai_addrlen, deadline); |
| 218 | |
| 219 | if (!ret) { |
| 220 | s.Swap(res); |
| 221 | } |
| 222 | |
| 223 | return ret; |
| 224 | } |
| 225 | |
| 226 | int ConnectD(TCont* cont, TSocketHolder& s, const TNetworkAddress& addr, TInstant deadline) noexcept { |
| 227 | int ret = EHOSTUNREACH; |
no test coverage detected