IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

QGrpcOperation Class

The QGrpcOperation class implements common logic to handle the gRPC communication from the client side.

This class was introduced in Qt 6.5.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

QGrpcOperation Class

Detailed Description

 

Member Function Documentation

 

void QGrpcOperation::cancel()

Attempts to cancel the operation in a channel and immediately emits QGrpcOperation::errorOccurred with the QGrpcStatus::Cancelled status code.

Any manipulation of the operation after this call has no effect.

void QGrpcOperation::errorOccurred(const QGrpcStatus &status) const

This signal indicates the error occurred during serialization.

This signal is emitted when error with status occurs in channel or during serialization.

See Also

void QGrpcOperation::finished()

This signal indicates the end of communication for this call.

If this signal is emitted by the stream then this stream is successfully closed either by client or server.

bool QGrpcOperation::isFinished() const

Returns true when QGrpcOperation finished its workflow, meaning it was finished, canceled, or error occurred, otherwise returns false.

QGrpcMetadata QGrpcOperation::metadata() const

Getter of the metadata received from the channel. For the HTTP2 channels it usually contains the HTTP headers received from the server.

QLatin1StringView QGrpcOperation::method() const

Getter of the method that this operation was intialized with.

T QGrpcOperation::read() const

Reads message from raw byte array stored in QGrpcOperation.

Returns a deserialized message or, on failure, a default-constructed message. If deserialization is not successful the QGrpcOperation::errorOccurred signal is emitted.

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+