10#ifndef PROTO_FUZZER_TLS_WEBSOCKET_MOCK_SERVER_H_
11#define PROTO_FUZZER_TLS_WEBSOCKET_MOCK_SERVER_H_
18#include "curl_fuzzer.pb.h"
22namespace proto_fuzzer {
29 curl::fuzzer::proto::TLS_CERTIFICATE_CHAIN_DEFAULT_EC);
37 void Install(CURL* easy)
override;
Reusable TLS carrier for protocol-specific mock peers.
void ObserveState() override
Retain protocol outcomes in coverage and introspector builds.
TlsWebSocketMockServer(curl::fuzzer::proto::TlsCertificateChainProfile certificate_chain=curl::fuzzer::proto::TLS_CERTIFICATE_CHAIN_DEFAULT_EC)
Construct a secure WebSocket peer with the selected certificate chain.
std::size_t DrainHandshakeData() override
Advance TLS and expose only decrypted application bytes to the inherited WebSocket observer.
std::unique_ptr< MockConnection > CreateConnection() override
Create one TLS-wrapped socketpair for the WebSocket exchange.
void FlushTransport() override
Turn queued application plaintext into TLS records before curl's next receive call,...
void Install(CURL *easy) override
Install the common WebSocket callbacks, then require verification against the checked-in TLS test cer...
std::size_t completed_handshake_count() const
WebSocketMockServer()
Construct an idle WebSocketMockServer with no queued frames.
Reusable TLS transport for structured in-process protocol peers.
WebSocketMockServer — an in-process WebSocket peer that drives a dynamic 101 handshake and then feeds...