Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update MessageEntry to support sending multiple entries at once #66

Open
woswos opened this issue Mar 17, 2021 · 0 comments
Open

Update MessageEntry to support sending multiple entries at once #66

woswos opened this issue Mar 17, 2021 · 0 comments
Assignees
Labels
enhancement New feature or request software

Comments

@woswos
Copy link
Member

woswos commented Mar 17, 2021

This was the draft version of MessageEntry before the unified messages class. First understand and remember what we were targeting. Later, find a nice way to integrate it into the class.

class MessageEntry {
   public:
      MessageType type = ENTRY;
      
          string_t serialize(std::vector<std::pair<uint32_t, string_t>> entries) {
          
                DynamicJsonDocument payload(MESSAGE_REQUEST_APPEND_ENTRY_PAYLOAD_SIZE);
                
                string_t serialized_payload;
                payload["type"] = type;
                payload["entries"] = entries;
                
                serializeJson(payload, serialized_payload);
          
          return serialized_payload;
    }
  };
@woswos woswos self-assigned this Mar 17, 2021
@niniack niniack closed this as completed Mar 21, 2021
@woswos woswos reopened this Mar 21, 2021
@woswos woswos changed the title Add MessageEntry to messages Update MessageEntry to support sending multiple entries at once Apr 2, 2021
@woswos woswos added the enhancement New feature or request label Apr 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request software
Projects
None yet
Development

No branches or pull requests

2 participants