QGrpcBidiStream Class
QGrpcBidiStream クラスは、双方向ストリーミング RPC の処理に必要な機能を提供します。詳細...
| ヘッダー: | #include <QGrpcBidiStream> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Grpc) target_link_libraries(mytarget PRIVATE Qt6::Grpc) |
| 以下より: | Qt 6.7 |
| 継承元: | QGrpcOperation |
パブリック関数
| virtual | ~QGrpcBidiStream() override |
| void | writeMessage(const QProtobufMessage &message) |
(since 6.8) void | writesDone() |
シグナル
| void | messageReceived() |
詳細な説明
QGrpcBidiStream クラスは、双方向ストリーミングのリモートプロシージャコール(RPC)を処理するためのインターフェースを提供します。これは、4つの gRPC™サービス・メソッドの 1 つです。
概要については、『Qt GRPC クライアントガイド』を参照してください。
注: Client インターフェースによって返される一意の RPC ハンドラを管理し、少なくともfinished シグナルが発信されるまではその存在を確保するのは、ユーザーの 責任です。このシグナルを受信した後、ハンドラは安全に再割り当てまたは破棄することができます。
メンバ関数のドキュメント
[override virtual noexcept] QGrpcBidiStream::~QGrpcBidiStream()
QGrpcBidiStream を削除します。
[signal] void QGrpcBidiStream::messageReceived()
このシグナルは、ストリーミング RPC がサーバーから新しいメッセージを受信した際に発生します。その後、read() メソッドを使用して、受信したメッセージのデシリアライズを行うことができます。
void QGrpcBidiStream::writeMessage(const QProtobufMessage &message)
message をシリアル化し、サーバーに送信します。
[since 6.8] void QGrpcBidiStream::writesDone()
クライアント側からストリームを終了します(ハーフクローズ)。この呼び出し後も、サーバーは引き続き応答を送信できます。
この関数は Qt 6.8 で導入されました。
© 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.