Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
Http2::FrameWriter Class Reference

#include <http2frames_p.h>

+ Collaboration diagram for Http2::FrameWriter:

Public Types

using payload_type = std::vector< uchar >
 
using size_type = payload_type::size_type
 

Public Member Functions

 FrameWriter ()
 
 FrameWriter (FrameType type, FrameFlags flags, quint32 streamID)
 
FrameoutboundFrame ()
 
void setOutboundFrame (Frame &&newFrame)
 
void start (FrameType type, FrameFlags flags, quint32 streamID)
 
void setPayloadSize (quint32 size)
 
void setType (FrameType type)
 
void setFlags (FrameFlags flags)
 
void addFlag (FrameFlag flag)
 
template<typename ValueType >
void append (ValueType val)
 
void append (uchar val)
 
void append (Settings identifier)
 
void append (const payload_type &payload)
 
void append (const uchar *begin, const uchar *end)
 
bool write (QAbstractSocket &socket) const
 
bool writeHEADERS (QAbstractSocket &socket, quint32 sizeLimit)
 
bool writeDATA (QAbstractSocket &socket, quint32 sizeLimit, const uchar *src, quint32 size)
 

Detailed Description

Definition at line 82 of file http2frames_p.h.

Member Typedef Documentation

◆ payload_type

Definition at line 85 of file http2frames_p.h.

◆ size_type

using Http2::FrameWriter::size_type = payload_type::size_type

Definition at line 86 of file http2frames_p.h.

Constructor & Destructor Documentation

◆ FrameWriter() [1/2]

Http2::FrameWriter::FrameWriter ( )

Definition at line 320 of file http2frames.cpp.

◆ FrameWriter() [2/2]

Http2::FrameWriter::FrameWriter ( FrameType  type,
FrameFlags  flags,
quint32  streamID 
)

Definition at line 324 of file http2frames.cpp.

Member Function Documentation

◆ addFlag()

void Http2::FrameWriter::addFlag ( FrameFlag  flag)

Definition at line 375 of file http2frames.cpp.

References Http2::Frame::flags(), and setFlags().

Referenced by writeHEADERS().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ append() [1/5]

void Http2::FrameWriter::append ( const payload_type payload)
inline

Definition at line 122 of file http2frames_p.h.

References append().

+ Here is the call graph for this function:

◆ append() [2/5]

void Http2::FrameWriter::append ( const uchar begin,
const uchar end 
)

Definition at line 380 of file http2frames.cpp.

References begin(), Http2::Frame::buffer, and Q_ASSERT.

+ Here is the call graph for this function:

◆ append() [3/5]

void Http2::FrameWriter::append ( Settings  identifier)
inline

Definition at line 118 of file http2frames_p.h.

References append().

+ Here is the call graph for this function:

◆ append() [4/5]

void Http2::FrameWriter::append ( uchar  val)
inline

Definition at line 113 of file http2frames_p.h.

References frame.

◆ append() [5/5]

template<typename ValueType >
void Http2::FrameWriter::append ( ValueType  val)
inline

Definition at line 107 of file http2frames_p.h.

References append(), and qToBigEndian().

Referenced by Http2::configurationToSettingsFrame().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ outboundFrame()

Frame & Http2::FrameWriter::outboundFrame ( )
inline

Definition at line 91 of file http2frames_p.h.

References frame.

Referenced by Http2::configurationToSettingsFrame().

+ Here is the caller graph for this function:

◆ setFlags()

void Http2::FrameWriter::setFlags ( FrameFlags  flags)

Definition at line 369 of file http2frames.cpp.

References Http2::Frame::buffer, Http2::frameHeaderSize, and Q_ASSERT.

Referenced by addFlag(), and writeHEADERS().

+ Here is the caller graph for this function:

◆ setOutboundFrame()

void Http2::FrameWriter::setOutboundFrame ( Frame &&  newFrame)

Definition at line 329 of file http2frames.cpp.

◆ setPayloadSize()

void Http2::FrameWriter::setPayloadSize ( quint32  size)

Definition at line 351 of file http2frames.cpp.

References Http2::Frame::buffer, Http2::frameHeaderSize, Http2::maxPayloadSize, and Q_ASSERT.

Referenced by writeDATA(), and writeHEADERS().

+ Here is the caller graph for this function:

◆ setType()

void Http2::FrameWriter::setType ( FrameType  type)

Definition at line 363 of file http2frames.cpp.

References Http2::Frame::buffer, Http2::frameHeaderSize, and Q_ASSERT.

◆ start()

void Http2::FrameWriter::start ( FrameType  type,
FrameFlags  flags,
quint32  streamID 
)

Definition at line 335 of file http2frames.cpp.

References Http2::Frame::buffer, Http2::frameHeaderSize, and qToBigEndian().

+ Here is the call graph for this function:

◆ write()

bool Http2::FrameWriter::write ( QAbstractSocket socket) const

Definition at line 396 of file http2frames.cpp.

References Http2::Frame::buffer, Http2::frameHeaderSize, Http2::goodFrame, Http2::LAST_FRAME_TYPE, Q_ASSERT, socket, Http2::Frame::type(), Http2::Frame::validateHeader(), and QIODevice::write().

Referenced by writeDATA(), and writeHEADERS().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ writeDATA()

bool Http2::FrameWriter::writeDATA ( QAbstractSocket socket,
quint32  sizeLimit,
const uchar src,
quint32  size 
)

Definition at line 460 of file http2frames.cpp.

References Http2::maxPayloadSize, Q_ASSERT, setPayloadSize(), socket, QIODevice::write(), and write().

+ Here is the call graph for this function:

◆ writeHEADERS()

bool Http2::FrameWriter::writeHEADERS ( QAbstractSocket socket,
quint32  sizeLimit 
)

Definition at line 410 of file http2frames.cpp.

References addFlag(), Http2::Frame::buffer, Http2::CONTINUATION, Http2::EMPTY, Http2::END_HEADERS, Http2::Frame::flags(), Http2::frameHeaderSize, Http2::maxPayloadSize, Q_ASSERT, setFlags(), setPayloadSize(), socket, Http2::Frame::streamID(), QIODevice::write(), and write().

+ Here is the call graph for this function:

The documentation for this class was generated from the following files: