Add method to get how many bytes can be written in to ReplyBuilderInterface

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Done
    • Priority: Major - P3
    • 3.1.5
    • Affects Version/s: None
    • Component/s: Networking
    • None
    • Minor Change
    • Platform 5 06/26/16
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      As OP_COMMANDREPLY can take ~48MB of output docs, and OP_REPLY (for commands) is limited to the 16MB document limit, commands that use output docs need to know when to stop appending documents to the response.

      We should add a new method to ReplyBuilderInterface:

      virtual std::size_t getRemainingSpaceInReply() const;
      

      That returns how many bytes can be written to the message. Then we will need concrete implementations in CommandReplyBuilder (OP_COMMANDREPLY) and LegacyReplyBuilder (OP_REPLY)

      cc: david.storch

            Assignee:
            Misha Tyulenev (Inactive)
            Reporter:
            Adam Midvidy (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: