cutelyst  4.5.1
A C++ Web Framework built on top of Qt, using the simple approach of Catalyst (Perl) framework.
Cutelyst::H2Stream Class Referencefinal
Inheritance diagram for Cutelyst::H2Stream:

Public Types

enum  State { Idle , Open , HalfClosed , Closed }
 
- Public Types inherited from Cutelyst::EngineRequest
enum  StatusFlag : quint8 {
  InitialState , FinalizedHeaders , IOWrite , Chunked ,
  ChunkedDone , Async , Finalized
}
 

Public Member Functions

 H2Stream (quint32 streamId, qint32 initialWindowSize, ProtoRequestHttp2 *protoRequestH2)
 
qint64 doWrite (const char *data, qint64 len) override final
 
void processingFinished () override final
 
void windowUpdated ()
 
bool writeHeaders (quint16 status, const Cutelyst::Headers &headers) override final
 
- Public Member Functions inherited from Cutelyst::EngineRequest
void finalize ()
 
virtual void finalizeBody ()
 
virtual void finalizeCookies ()
 
virtual void finalizeError ()
 
virtual bool finalizeHeaders ()
 
void setPath (char *rawPath, const int len)
 
void setPath (QByteArray &path)
 
virtual bool webSocketClose (quint16 code, const QString &reason)
 
bool webSocketHandshake (const QByteArray &key, const QByteArray &origin, const QByteArray &protocol)
 
virtual bool webSocketSendBinaryMessage (const QByteArray &message)
 
virtual bool webSocketSendPing (const QByteArray &payload)
 
virtual bool webSocketSendTextMessage (const QString &message)
 
qint64 write (const char *data, qint64 len)
 

Public Attributes

qint64 consumedData
 
qint64 contentLength
 
qint32 dataSent
 
bool gotPath
 
QEventLooploop
 
ProtoRequestHttp2protoRequest
 
QByteArray scheme
 
quint8 state
 
quint32 streamId
 
qint32 windowSize
 
- Public Attributes inherited from Cutelyst::EngineRequest
QIODevicebody
 
Contextcontext
 
Headers headers
 
bool isSecure
 
QByteArray method
 
QString path
 
QByteArray protocol
 
QByteArray query
 
QHostAddress remoteAddress
 
quint16 remotePort
 
QString remoteUser
 
QByteArray serverAddress
 
TimePointSteady startOfRequest
 
Status status
 

Additional Inherited Members

- Protected Member Functions inherited from Cutelyst::EngineRequest
virtual bool webSocketHandshakeDo (const QByteArray &key, const QByteArray &origin, const QByteArray &protocol)
 

Detailed Description

Definition at line 34 of file protocolhttp2.h.

Member Function Documentation

◆ doWrite()

qint64 H2Stream::doWrite ( const char *  data,
qint64  len 
)
finaloverridevirtual

Reimplement this to do the RAW writing to the client

Implements Cutelyst::EngineRequest.

Definition at line 867 of file protocolhttp2.cpp.

References QEventLoop::exec().

◆ processingFinished()

void H2Stream::processingFinished ( )
finaloverridevirtual

This is called when the Application chain is finished processing this request, here the request can send final bytes to the client or do a clean up.

Default implementation deletes both body and context.

If a WebSocket upgrade was made then you will want to keep the context object around.

Reimplemented from Cutelyst::EngineRequest.

Definition at line 944 of file protocolhttp2.cpp.

◆ writeHeaders()

bool H2Stream::writeHeaders ( quint16  status,
const Cutelyst::Headers headers 
)
finaloverridevirtual

Reimplement this to write the headers back to the client

Implements Cutelyst::EngineRequest.

Definition at line 926 of file protocolhttp2.cpp.

References QByteArray::constData(), Cutelyst::EngineRequest::headers, QByteArray::size(), and Cutelyst::EngineRequest::status.