Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
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 (QByteArrayView payload)
 
void append (const uchar *begin, const uchar *end)
 
bool write (QIODevice &socket) const
 
bool writeHEADERS (QIODevice &socket, quint32 sizeLimit)
 
bool writeDATA (QIODevice &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 321 of file http2frames.cpp.

◆ FrameWriter() [2/2]

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

Definition at line 325 of file http2frames.cpp.

Member Function Documentation

◆ addFlag()

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

Definition at line 376 of file http2frames.cpp.

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

Referenced by QHttp2Stream::sendHEADERS(), and writeHEADERS().

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

◆ append() [1/6]

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/6]

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

Definition at line 381 of file http2frames.cpp.

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

+ Here is the call graph for this function:

◆ append() [3/6]

void Http2::FrameWriter::append ( QByteArrayView payload)
inline

Definition at line 126 of file http2frames_p.h.

References append(), QByteArrayView::begin(), and QByteArrayView::end().

+ Here is the call graph for this function:

◆ append() [4/6]

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() [5/6]

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

Definition at line 113 of file http2frames_p.h.

References frame.

◆ append() [6/6]

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(), QHttp2Stream::sendHEADERS(), QHttp2Connection::sendPing(), and QHttp2Stream::sendRST_STREAM().

+ 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(), and QHttp2Stream::sendHEADERS().

+ Here is the caller graph for this function:

◆ setFlags()

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

Definition at line 370 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 330 of file http2frames.cpp.

◆ setPayloadSize()

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

Definition at line 352 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 364 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 336 of file http2frames.cpp.

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

Referenced by QHttp2Stream::sendHEADERS(), QHttp2Connection::sendPing(), and QHttp2Stream::sendRST_STREAM().

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

◆ write()

bool Http2::FrameWriter::write ( QIODevice & socket) const

Definition at line 397 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 QHttp2Connection::sendPing(), QHttp2Stream::sendRST_STREAM(), writeDATA(), and writeHEADERS().

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

◆ writeDATA()

bool Http2::FrameWriter::writeDATA ( QIODevice & socket,
quint32 sizeLimit,
const uchar * src,
quint32 size )

Definition at line 461 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 ( QIODevice & socket,
quint32 sizeLimit )

Definition at line 411 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().

Referenced by QHttp2Stream::sendHEADERS().

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

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