QGrpcClientBase Class

QGrpcClientBase 클래스는 생성된 클라이언트 인터페이스의 베이스 역할을 합니다. 더 보기...

헤더: #include <QGrpcClientBase>
CMake: find_package(Qt6 REQUIRED COMPONENTS Grpc)
target_link_libraries(mytarget PRIVATE Qt6::Grpc)
이후 Qt 6.5
상속합니다: QObject

공용 함수

virtual ~QGrpcClientBase() override
bool attachChannel(std::shared_ptr<QAbstractGrpcChannel> channel)
(since 6.7) std::shared_ptr<QAbstractGrpcChannel> channel() const

시그널

(since 6.7) void channelChanged()

상세 설명

QGrpcClientBase 클래스는 서비스 정의의 생성된 클라이언트 인터페이스에 대한 공통 함수 집합을 제공합니다. gRPC 서비스 정의의 생성된 클라이언트 인터페이스에 대한 공통 기능 세트를 제공합니다.

이 클래스의 RPC 메서드는 직접 호출해서는 안 됩니다.

참고: 생성되지 않은 멤버 함수에 대해서는 스레드 안전성이 적용됩니다. 이러한 함수는 객체가 생성된 동일한 thread 에서 호출해야 합니다.

멤버 함수 문서

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

QGrpcClientBase 를 파괴합니다.

bool QGrpcClientBase::attachChannel(std::shared_ptr<QAbstractGrpcChannel> channel)

gRPC 작업을 위한 전송 계층으로 channel 을 클라이언트에 연결합니다. 채널이 성공적으로 연결되면 true 을 반환하고, 그렇지 않으면 false 을 반환합니다.

요청 및 응답 메시지는 채널이 지원하는 형식으로 직렬화됩니다.

참고 :경고: Qt GRPC 은 채널 수준에서 스레드 안전을 보장하지 않습니다. QGrpcClientBase 와 동일한 스레드에서 채널 관련 함수를 호출해야 합니다.

참고: channel 속성에 대한 설정자 함수

[since 6.7] std::shared_ptr<QAbstractGrpcChannel> QGrpcClientBase::channel() const

이 클라이언트에 연결된 채널을 반환합니다.

참고: 프로퍼티 채널에 대한 겟터 함수.

이 함수는 Qt 6.7에 도입되었습니다.

[signal, since 6.7] void QGrpcClientBase::channelChanged()

새 채널이 클라이언트에 연결되었음을 나타냅니다.

참고: 속성에 대한 알림 신호 channel.

이 함수는 Qt 6.7에 도입되었습니다.

© 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.