QAbstractGrpcClient Class

The QAbstractGrpcClient class is bridge between gRPC clients and channels. 更多...

头: #include <QAbstractGrpcClient>
CMake: find_package(Qt6 REQUIRED COMPONENTS Grpc)
target_link_libraries(mytarget PRIVATE Qt6::Grpc)
Since: Qt 6.5
继承: QObject

公共函数

void attachChannel (const std::shared_ptr<QAbstractGrpcChannel> & channel )

详细描述

QAbstractGrpcClient provides a set of functions for client classes generated out of protobuf services. QAbstractGrpcClient enforces thread safety for startStream() and call() methods of generated clients.

成员函数文档编制

void QAbstractGrpcClient:: attachChannel (const std::shared_ptr < QAbstractGrpcChannel > & channel )

Attaches channel to client as transport layer for gRPC.

Parameters and return values will be serialized to the channel in a format it supports.

注意: 警告 : Qt GRPC doesn't guarantee thread safety on the channel level. You have to invoke the channel-related functions on the same thread as QAbstractGrpcClient .