QAbstractGrpcChannel Class
QAbstractGrpcChannel 类提供了一个接口,用于实现传输层的 gRPC™操作的传输层接口。更多
Header: | #include <QAbstractGrpcChannel> |
CMake.QAbstractGrpcChannel | find_package(Qt6 REQUIRED COMPONENTS Grpc) target_link_libraries(mytarget PRIVATE Qt6::Grpc) |
自 | Qt 6.5 |
继承: |
公共函数
virtual | ~QAbstractGrpcChannel() |
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) |
保护函数
QAbstractGrpcChannel() | |
QAbstractGrpcChannel(const QGrpcChannelOptions &options) |
详细说明
实施此接口可创建用于 gRPC™运输。QGrpcHttp2Channel 类是 QAbstractGrpcChannel 的全功能实现,用于 HTTP/2 通信。
另请参阅 QGrpcChannelOptions 和QGrpcHttp2Channel 。
成员函数文档
[since 6.8]
void QAbstractGrpcChannel::setChannelOptions(QGrpcChannelOptions &&options)
[since 6.8]
void QAbstractGrpcChannel::setChannelOptions(const QGrpcChannelOptions &options)
设置频道options 。
注意: 更新后的通道选项不会影响当前活动的调用或流。修改后的选项仅适用于通过此通道进行的新 RPC。
此函数在 Qt 6.8 中引入。
另请参阅 channelOptions 。
[protected]
QAbstractGrpcChannel::QAbstractGrpcChannel()
默认-构造 QAbstractGrpcChannel。
[explicit protected]
QAbstractGrpcChannel::QAbstractGrpcChannel(const QGrpcChannelOptions &options)
使用指定的options 构造 QAbstractGrpcChannel。
[virtual noexcept]
QAbstractGrpcChannel::~QAbstractGrpcChannel()
[noexcept]
const QGrpcChannelOptions &QAbstractGrpcChannel::channelOptions() const &
返回通道使用的选项。
另请参见 setChannelOptions 。
[pure virtual]
std::shared_ptr<QAbstractProtobufSerializer> QAbstractGrpcChannel::serializer() const
此纯虚拟函数可检索用于信息序列化和反序列化的QAbstractProtobufSerializer 。
© 2025 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.