이 페이지에서

QGrpcWriteMessageInterceptor Class

RPC용으로 작성된 발신 메시지를 가로챕니다. 더 보기...

헤더: #include <QGrpcInterceptor>
CMake: find_package(Qt6 REQUIRED COMPONENTS Grpc)
target_link_libraries(mytarget PRIVATE Qt6::Grpc)
다음부터: Qt 6.11

참고: 이 클래스의 모든 함수는 재진입 가능합니다.

공개 함수

virtual ~QGrpcWriteMessageInterceptor()
virtual void onWriteMessage(QGrpcInterceptionContext &context, QProtobufMessage &message) = 0

상세 설명

QGrpcWriteMessageInterceptor를 구현하여 RPC가 시작된 후 RPC의 일부로 쓰여지는 메시지를 관찰하거나 수정할 수 있습니다.

인터셉션 메커니즘에 대한 소개와 인터셉터 인터페이스가 RPC의 수명 주기에 어떻게 관여하는지에 대한 내용은 Qt GRPC 인터셉터 개요를 참조하십시오.

참고: 이 인터셉터는 인바운드 방향으로 작동합니다. 여러 인터셉터 콜백이 체인을 통해 흐르는 방식에 대한 자세한 내용은 ‘방향 및 흐름’ 섹션을 참조하십시오.

또한 QtGrpc::InterceptorCapability::WriteMessage 및 QGrpcInterceptionContext 를참조하십시오 .

멤버 함수 문서

[virtual noexcept] QGrpcWriteMessageInterceptor::~QGrpcWriteMessageInterceptor()

요격기를 파괴합니다.

[pure virtual] void QGrpcWriteMessageInterceptor::onWriteMessage(QGrpcInterceptionContext &context, QProtobufMessage &message)

RPC를 위해 발신 message 이 기록되기 직전에 호출됩니다.

context 는 가로채진 RPC에 대한 정보를 제공합니다. message 는 그 자리에서 수정할 수 있습니다.

QGrpcClientStream::writeMessage() 및 QGrpcBidiStream::writeMessage()도 참조하십시오 .

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