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)을 처리하기 위한 인터페이스를 제공하며, 이는 네 가지 gRPC™서비스 방법 중 하나입니다.
높은 수준의 개요는 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.