| 253 | { |
| 254 | char addressBuffer[256]; |
| 255 | Span<char> ipAddress = {addressBuffer}; |
| 256 | SC_TRY(SocketDNS::resolveDNS(currentURL.hostname, ipAddress)); |
| 257 | |
| 258 | SocketIPAddress remoteAddress; |
| 259 | SC_TRY(remoteAddress.fromAddressPort({ipAddress, true, StringEncoding::Ascii}, currentURL.port)); |
| 260 | SC_TRY(eventLoop->createAsyncTCPSocket(remoteAddress.getAddressFamily(), connection->socket)); |
| 261 | |
| 262 | state = State::Connecting; |
| 263 | return connectAsync.start(*eventLoop, connection->socket, remoteAddress); |
| 264 | } |
| 265 | |
| 266 | void HttpAsyncClient::onConnected(AsyncSocketConnect::Result& result) |
| 267 | { |
| 268 | if (not result.isValid()) |
| 269 | { |
| 270 | fail(result.isValid()); |
nothing calls this directly
no test coverage detected