QAbstractGrpcChannel Class

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

Header: #include <QAbstractGrpcChannel>
CMake: find_package(Qt6 REQUIRED COMPONENTS Grpc)
target_link_libraries(mytarget PRIVATE Qt6::Grpc)
Since: Qt 6.5
Inherited By:

QGrpcHttp2Channel

Public Functions

const QGrpcChannelOptions &channelOptions() const &
virtual std::shared_ptr<QAbstractProtobufSerializer> serializer() const = 0
(since 6.8) void setChannelOptions(QGrpcChannelOptions &&options)
(since 6.8) void setChannelOptions(const QGrpcChannelOptions &options)

Protected Functions

(since 6.8) QAbstractGrpcChannel(QAbstractGrpcChannelPrivate &dd)

Detailed Description

Implement this interface to create your own custom channel for gRPC transportation. We provide the QGrpcHttp2Channel, which is a fully featured implementation of the QAbstractGrpcChannel for HTTP/2 communication.

Member Function Documentation

[since 6.8] void QAbstractGrpcChannel::setChannelOptions(QGrpcChannelOptions &&options)

[since 6.8] void QAbstractGrpcChannel::setChannelOptions(const QGrpcChannelOptions &options)

Sets the channel options.

Note: The updated channel options do not affect currently active calls or streams. The revised options will apply only to new RPCs made through this channel.

This function was introduced in Qt 6.8.

See also channelOptions.

[explicit protected, since 6.8] QAbstractGrpcChannel::QAbstractGrpcChannel(QAbstractGrpcChannelPrivate &dd)

Constructs QAbstractGrpcChannel using the private message implementation from the derived class.

This function was introduced in Qt 6.8.

[noexcept] const QGrpcChannelOptions &QAbstractGrpcChannel::channelOptions() const &

Returns QGrpcChannelOptions used by the channel.

See also setChannelOptions().

[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 to perform serialization and deserialization of the message.

© 2024 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.