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

Method connect

Libraries/Http/HttpWebSocket.cpp:578–591  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

576}
577
578Result HttpWebSocketClientHandshake::connect(HttpAsyncClient& newClient, AsyncEventLoop& loop, StringSpan url,
579 StringSpan newClientKey, HttpWebSocketTransportView& newTransport)
580{
581 SC_TRY(HttpWebSocketHandshake::validateClientKey(newClientKey));
582 client = &newClient;
583 transport = &newTransport;
584 clientKey = newClientKey;
585 transport->reset();
586
587 client->onPrepareRequest.bind<HttpWebSocketClientHandshake, &HttpWebSocketClientHandshake::onPrepareRequest>(*this);
588 client->onResponse.bind<HttpWebSocketClientHandshake, &HttpWebSocketClientHandshake::onResponse>(*this);
589 client->onError.bind<HttpWebSocketClientHandshake, &HttpWebSocketClientHandshake::onClientError>(*this);
590 return client->start(loop, HttpParser::Method::HttpGET, url, false);
591}
592
593void HttpWebSocketClientHandshake::onPrepareRequest(HttpAsyncClientRequest& request)
594{

Callers

nothing calls this directly

Calls 2

resetMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected