My Project
Loading...
Searching...
No Matches
MessageFragmenter.hpp
1#pragma once
2
3#include <vector>
4#include <string>
5#include "message/MessageFrame.hpp"
6
8private:
9 static constexpr size_t MAX_FRAGMENT_SIZE = 4000; // Leave room for headers
10
15 std::string generateMessageId();
16
17public:
24 std::vector<MessageFrame> fragment(const std::string& payload, MessageType type);
25
30 static size_t getMaxFragmentSize() { return MAX_FRAGMENT_SIZE; }
31};
Definition MessageFragmenter.hpp:7
std::vector< MessageFrame > fragment(const std::string &payload, MessageType type)
Fragments a large message into smaller frames.
Definition MessageFragmenter.cpp:25
static size_t getMaxFragmentSize()
Gets the maximum fragment size.
Definition MessageFragmenter.hpp:30