| 267 | { |
| 268 | if (not result.isValid()) |
| 269 | { |
| 270 | fail(result.isValid()); |
| 271 | return; |
| 272 | } |
| 273 | |
| 274 | Result readInit = connection->readableSocketStream.init(connection->buffersPool, *eventLoop, connection->socket); |
| 275 | if (not readInit) |
| 276 | { |
| 277 | fail(readInit); |
| 278 | return; |
| 279 | } |
| 280 | Result writeInit = connection->writableSocketStream.init(connection->buffersPool, *eventLoop, connection->socket); |
| 281 | if (not writeInit) |
| 282 | { |
| 283 | fail(writeInit); |
| 284 | return; |
| 285 | } |
| 286 | connection->resetTransportStreams(); |
| 287 | |
| 288 | if (transportSetup.isValid()) |
| 289 | { |
| 290 | HttpAsyncClientTransportSetup setup; |
| 291 | setup.connection = connection; |
| 292 | setup.eventLoop = eventLoop; |
| 293 | setup.url = ¤tURL; |
| 294 | setup.complete = {[this](Result setupResult) { completeTransportSetup(setupResult); }}; |
| 295 | |
| 296 | Result nativeSocket = |
| 297 | connection->socket.get(setup.nativeSocket, Result::Error("HttpAsyncClient invalid socket")); |
| 298 | if (not nativeSocket) |
| 299 | { |
| 300 | fail(nativeSocket); |
| 301 | return; |
| 302 | } |
| 303 | |
| 304 | Result setupResult = transportSetup(setup); |
| 305 | if (not setupResult) |
| 306 | { |
| 307 | fail(setupResult); |
| 308 | } |
| 309 | return; |
| 310 | } |
| 311 |
nothing calls this directly
no test coverage detected