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

Public Member Functions

 ProtoRequestFastCGI (Socket *sock, int bufferSize)
 
qint64 doWrite (const char *data, qint64 len) override final
 
qint64 doWrite (const QByteArray &data)
 
void processingFinished () override final
 
void resetData () override final
 
void setupNewConnection (Socket *sock) override
 
bool writeHeaders (quint16 status, const Cutelyst::Headers &headers) override final
 
- Public Member Functions inherited from Cutelyst::ProtocolData
 ProtocolData (Socket *sock, int bufferSize)
 
virtual void socketDisconnected ()
 
- 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

quint16 pktsize
 
quint16 stream_id
 
- Public Attributes inherited from Cutelyst::ProtocolData
int buf_size
 
char * buffer
 
ParserState connState
 
qint64 contentLength
 
HeaderConnection headerConnection
 
bool headerHost
 
QIODeviceio
 
Socketsock
 
ProtocolDataupgradedFrom
 
bool X_Forwarded_For
 
bool X_Forwarded_Host
 
bool X_Forwarded_Proto
 
- 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

- Public Types inherited from Cutelyst::ProtocolData
enum class  HeaderConnection { NotSet , Keep , Close , Upgrade }
 
enum  ParserState { MethodLine , HeaderLine , ContentBody , H2Frames }
 
- Public Types inherited from Cutelyst::EngineRequest
enum  StatusFlag : quint8 {
  InitialState , FinalizedHeaders , IOWrite , Chunked ,
  ChunkedDone , Async , Finalized
}
 
- Protected Member Functions inherited from Cutelyst::EngineRequest
virtual bool webSocketHandshakeDo (const QByteArray &key, const QByteArray &origin, const QByteArray &protocol)
 

Detailed Description

Definition at line 18 of file protocolfastcgi.h.

Constructor & Destructor Documentation

◆ ProtoRequestFastCGI()

ProtoRequestFastCGI::ProtoRequestFastCGI ( Socket sock,
int  bufferSize 
)

Definition at line 434 of file protocolfastcgi.cpp.

◆ ~ProtoRequestFastCGI()

ProtoRequestFastCGI::~ProtoRequestFastCGI ( )
override

Definition at line 439 of file protocolfastcgi.cpp.

Member Function Documentation

◆ doWrite() [1/2]

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

Reimplement this to do the RAW writing to the client

Implements Cutelyst::EngineRequest.

Definition at line 486 of file protocolfastcgi.cpp.

References QIODevice::errorString(), and QIODevice::write().

Referenced by writeHeaders().

◆ doWrite() [2/2]

qint64 Cutelyst::ProtoRequestFastCGI::doWrite ( const QByteArray data)
inline

Definition at line 33 of file protocolfastcgi.h.

◆ processingFinished()

void ProtoRequestFastCGI::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 550 of file protocolfastcgi.cpp.

References Cutelyst::EngineRequest::status, and QIODevice::write().

◆ resetData()

void Cutelyst::ProtoRequestFastCGI::resetData ( )
inlinefinaloverridevirtual

Reimplemented from Cutelyst::ProtocolData.

Definition at line 37 of file protocolfastcgi.h.

◆ setupNewConnection()

void ProtoRequestFastCGI::setupNewConnection ( Socket sock)
overridevirtual

Implements Cutelyst::ProtocolData.

Definition at line 443 of file protocolfastcgi.cpp.

◆ writeHeaders()

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

Member Data Documentation

◆ pktsize

quint16 Cutelyst::ProtoRequestFastCGI::pktsize

Definition at line 58 of file protocolfastcgi.h.

◆ stream_id

quint16 Cutelyst::ProtoRequestFastCGI::stream_id

Definition at line 57 of file protocolfastcgi.h.