Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How do I Finish a gRPC message-stream from the client?

How do I Finish a gRPC message-stream from the client?

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 579 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jarle
    wrote on last edited by
    #1

    When I open an outgoing message-stream from a client, I get a std::shared_ptr<QGrpcClientStream> value.

    I can send messages with stream->sendMessage(msg), and I can call stream->read<>() to get the the latest message in the stream onFinished handler. However, the handler is never called because I don't know how to finish the stream.

    In the standard async/callback gRPC interface, the client can call stream->StartWriteLast() or stream->startWritesDone() to tell the server it's done.

    Is there a way in QT's gRPC interfaces to tell the server that a client is done? The closest it've found is stream->cancel() - but that terminates the stream, and the client don't receive the servers single reply-message for the request.

    I have not tried bidirectional streams yet using QT's interface, but looking at the QGrpcBidirStream class, it has only a sendMessage() method and no obvious way to finish the stream from the client.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      The module being in TP, I would suggest to open a ticket on the bug report system as it seems to be something that is missing.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      J 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi,

        The module being in TP, I would suggest to open a ticket on the bug report system as it seems to be something that is missing.

        J Offline
        J Offline
        jarle
        wrote on last edited by
        #3

        @SGaist I added a bug report for the issue.

        1 Reply Last reply
        0
        • J jarle has marked this topic as solved on

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved