本页内容

QGrpcWritesDoneInterceptor Class

拦截 RPC 消息写入操作的完成。更多...

头文件: #include <QGrpcInterceptor>
CMake: find_package(Qt6 REQUIRED COMPONENTS Grpc)
target_link_libraries(mytarget PRIVATE Qt6::Grpc)
自: Qt 6.11

注意:该类中的所有函数均为可重入的。

公共函数

virtual ~QGrpcWritesDoneInterceptor()
virtual void onWritesDone(QGrpcInterceptionContext &context) = 0

详细说明

实现 QGrpcWritesDoneInterceptor 以观察何时将不再为 RPC 写入任何出站消息。

有关拦截机制的介绍以及拦截器接口如何参与 RPC 生命周期的信息,请参阅《Qt GRPC 拦截器概述》。

注意:此 拦截器在入站方向上运行。有关多个拦截器回调如何在链中流转的详细信息,请参阅“方向和流”部分。

另请参阅 QtGrpc::InterceptorCapability::WritesDone 和QGrpcInterceptionContext 。

成员函数文档

[virtual noexcept] QGrpcWritesDoneInterceptor::~QGrpcWritesDoneInterceptor()

摧毁了这架拦截机。

[pure virtual] void QGrpcWritesDoneInterceptor::onWritesDone(QGrpcInterceptionContext &context)

当本地端指示不再写入任何出站消息时调用此方法。

context 提供有关被拦截的 RPC 的信息。

另请参阅 QGrpcClientStream::writesDone() 和QGrpcBidiStream::writesDone()。

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