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

Serialize a proto WebSocketFrame message into RFC 6455 wire bytes. 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

Serialize a proto WebSocketFrame message into RFC 6455 wire bytes.

Definition in file ws_frame.h.

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.