MCPcopy Create free account
hub / github.com/Pagghiu/SaneCppLibraries / ensureConnected

Method ensureConnected

Libraries/Http/HttpAsyncClient.cpp:242–253  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

240 if (&connection->getWritableTransportStream() == &connection->writableSocketStream)
241 {
242 SC_TRY(connection->writableSocketStream.init(connection->buffersPool, *eventLoop, connection->socket));
243 }
244 SC_TRY(beginResponseRead());
245 return beginRequestSend();
246 }
247
248 closeConnection();
249 return beginSocketConnection();
250}
251
252Result HttpAsyncClient::beginSocketConnection()
253{
254 char addressBuffer[256];
255 Span<char> ipAddress = {addressBuffer};
256 SC_TRY(SocketDNS::resolveDNS(currentURL.hostname, ipAddress));

Callers

nothing calls this directly

Calls 1

initMethod · 0.45

Tested by

no test coverage detected