QCoapInternalReply Class

The QCoapInternalReply class contains data related to a received message. More...

Header: #include <QCoapInternalReply>
Inherits: QCoapInternalMessage

Public Functions

QCoapInternalReply(QObject *parent = nullptr)
void appendData(const QByteArray &data)
bool hasMoreBlocksToSend() const
int nextBlockToSend() const
QtCoap::ResponseCode responseCode() const
QHostAddress senderAddress() const
void setSenderAddress(const QHostAddress &address)

Reimplemented Public Functions

virtual void addOption(const QCoapOption &option) override

Detailed Description

\internal

It is a subclass of QCoapInternalMessage.

\reentrant

See also QCoapInternalMessage and QCoapInternalRequest.

Member Function Documentation

[explicit] QCoapInternalReply::QCoapInternalReply(QObject *parent = nullptr)

\internalConstructs a new QCoapInternalReply with parent as the parent object.

[override virtual] void QCoapInternalReply::addOption(const QCoapOption &option)

Reimplements: QCoapInternalMessage::addOption(const QCoapOption &option).

\internalAdds the given CoAP option and sets block parameters if needed.

void QCoapInternalReply::appendData(const QByteArray &data)

\internalAppends the given data byte array to the current payload.

bool QCoapInternalReply::hasMoreBlocksToSend() const

\internalReturns true if the client has one or more blocks to send.

int QCoapInternalReply::nextBlockToSend() const

\internalReturns the number of the next block, if there is another block to come, otherwise -1. For more details, refer to the RFC 7959.

QtCoap::ResponseCode QCoapInternalReply::responseCode() const

\internalReturns the response code of the reply.

QHostAddress QCoapInternalReply::senderAddress() const

\internalReturns the host address from which the reply was received.

See also setSenderAddress().

void QCoapInternalReply::setSenderAddress(const QHostAddress &address)

\internalSets the sender address.

See also senderAddress().