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

Implementation of SerializeWebSocketFrame. More...

Go to the source code of this file.

Functions

std::string proto_fuzzer::SerializeWebSocketFrame (const curl::fuzzer::proto::WebSocketFrame &frame)
 Serialise a proto WebSocketFrame into RFC 6455 wire bytes.

Detailed Description

Implementation of SerializeWebSocketFrame.

Definition in file ws_frame.cc.

Function Documentation

◆ SerializeWebSocketFrame()

std::string proto_fuzzer::SerializeWebSocketFrame ( const curl::fuzzer::proto::WebSocketFrame & frame)

Serialise a proto WebSocketFrame into RFC 6455 wire bytes.

No validation is performed — invalid combinations (reserved bits set, oversized length_form for a tiny payload, opcode > 15) round-trip to the decoder unchanged, which is the point.

Parameters
frameThe WebSocketFrame proto message to render.
Returns
The serialised byte string, ready to push onto the mock socket.

Definition at line 59 of file ws_frame.cc.