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

Method onResponse

Libraries/Http/HttpWebSocket.cpp:602–621  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

600}
601
602void HttpWebSocketClientHandshake::onResponse(HttpAsyncClientResponse& response)
603{
604 SC_HTTP_ASSERT_RELEASE(client != nullptr);
605 SC_HTTP_ASSERT_RELEASE(transport != nullptr);
606
607 Result result = HttpWebSocketHandshake::validateClientResponse(response, clientKey);
608 if (result)
609 {
610 result = client->detachWebSocketTransport(*transport);
611 }
612 if (not result)
613 {
614 fail(result);
615 return;
616 }
617 if (onConnected.isValid())
618 {
619 onConnected(*transport);
620 }
621}
622
623void HttpWebSocketClientHandshake::onClientError(Result result) { fail(result); }
624

Callers

nothing calls this directly

Calls 2

isValidMethod · 0.45

Tested by

no test coverage detected