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

QAbstractGrpcChannel Class

The QAbstractGrpcChannel class is interface that represents common gRPC channel functionality.

This class was introduced in Qt 6.5.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

QAbstractGrpcChannel Class

  • Header: QAbstractGrpcChannel

  • Since: Qt 6.5

  • CMake:

    find_package(Qt6 REQUIRED COMPONENTS Grpc)

    target_link_libraries(mytarget PRIVATE Qt6::Grpc)

  • Inherited By: QGrpcChannel and QGrpcHttp2Channel

Detailed Description

You may implement this interface to create your own channels for gRPC transport. QGrpcChannel or QGrpcHttp2Channel, which are full implementations of QAbstractGrpcChannel are recommended to use.

Member Function Documentation

 

[pure virtual] QGrpcStatus QAbstractGrpcChannel::call(QLatin1StringView method, QLatin1StringView service, QByteArrayView args, QByteArray &ret)

This pure virtual function synchronously calls the RPC method concatenated from the method and service parameters with the given args and writes the result to the output parameter ret.

You may reimplement this function in a subclass to define your own call mechanism behavior. QGrpcChannel or QGrpcHttp2Channel, which are full implementations of QAbstractGrpcChannel are recommended to use.

[pure virtual] std::shared_ptr<QGrpcCallReply> QAbstractGrpcChannel::call(QAbstractGrpcClient *client, QLatin1StringView method, QLatin1StringView service, QByteArrayView args)

This pure virtual function asynchronously calls the RPC method combined with the method and service parameters with the given args and returns an asynchronous response in the form of QGrpcCallReply, which uses the client to deserialize messages.

You may reimplement this function in a subclass to define your own call mechanism behavior. QGrpcChannel or QGrpcHttp2Channel, which are full implementations of QAbstractGrpcChannel are recommended to use.

[pure virtual] std::shared_ptr<QAbstractProtobufSerializer> QAbstractGrpcChannel::serializer() const

This pure virtual function shall return a shared pointer to QAbstractProtobufSerializer.

This function is called to obtain the QAbstractProtobufSerializer used by QAbstractGrpcClient to perform serialization and deserialization of the message.

[pure virtual] void QAbstractGrpcChannel::startStream(QGrpcStream *stream, QLatin1StringView service)

This pure virtual function starts a stream on a stream using QGrpcStream::method() and the service to get the name of the RPC method.

You may reimplement this function in a subclass to define your own stream mechanism behavior. QGrpcChannel or QGrpcHttp2Channel, which are full implementations of QAbstractGrpcChannel are recommended to use.

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