curl-fuzzer C++ reference
Loading...
Searching...
No Matches
websocket_mock_server.cc File Reference

Implementation of WebSocketMockServer. More...

Go to the source code of this file.

Functions

bool proto_fuzzer::ScenarioRequestsManualWsDrive (const curl::fuzzer::proto::Scenario &scenario)
 Mirror the sequential CURLOPT_CONNECT_ONLY setopts applied by ApplyScenarioOptions.

Detailed Description

Implementation of WebSocketMockServer.

Definition in file websocket_mock_server.cc.

Function Documentation

◆ ScenarioRequestsManualWsDrive()

bool proto_fuzzer::ScenarioRequestsManualWsDrive ( const curl::fuzzer::proto::Scenario & scenario)

Mirror the sequential CURLOPT_CONNECT_ONLY setopts applied by ApplyScenarioOptions.

Values above 2 are rejected by libcurl and therefore cannot replace the last accepted setting. Use the same descriptor-aware scalar decoder as ApplySetOption so compatibility inputs and cross-family mutations cannot make curl and its mock disagree about manual delivery. Restricting the scan to RuntimeOptionCount also prevents a compatibility- only suffix from changing mock delivery after curl stops observing options.

Parameters
scenarioStructured input whose retained option prefix is inspected.
Returns
True when the final accepted CONNECT_ONLY value is 2.

Definition at line 176 of file websocket_mock_server.cc.