QGrpcChannel Class

The QGrpcHttp2Channel class is an HTTP/2 implementation of QAbstractGrpcChannel, based on the reference gRPC C++ API. More...

Header: #include <QGrpcChannel>
CMake: find_package(Qt6 REQUIRED COMPONENTS Grpc)
target_link_libraries(mytarget PRIVATE Qt6::Grpc)
Since: Qt 6.5
Inherits: QAbstractGrpcChannel
Status: Technical Preview

Public Functions

QGrpcChannel(const QGrpcChannelOptions &options, QGrpcChannel::NativeGrpcChannelCredentials credentialsType)
virtual ~QGrpcChannel() override

Reimplemented Public Functions

virtual std::shared_ptr<QAbstractProtobufSerializer> serializer() const override

Detailed Description

QGrpcChannel accepts the same grpc::ChannelCredentials type that is required by native-api grpc::CreateChannel.

See also gRPC ChannelCredentials.

Member Function Documentation

[explicit] QGrpcChannel::QGrpcChannel(const QGrpcChannelOptions &options, QGrpcChannel::NativeGrpcChannelCredentials credentialsType)

Constructs a gRPC channel, with options and credentialsType.

[override virtual noexcept] QGrpcChannel::~QGrpcChannel()

Destroys the QGrpcChannel object.

[override virtual] std::shared_ptr<QAbstractProtobufSerializer> QGrpcChannel::serializer() const

Reimplements: QAbstractGrpcChannel::serializer() const.

Returns the newly created QProtobufSerializer shared pointer.