nanoMMO 0.97.8
Building an MMO: The Engineering Series
Loading...
Searching...
No Matches
framing.h File Reference
#include <cstddef>
#include <optional>
#include <string>
#include <string_view>
#include "absl/status/status.h"
#include "google/protobuf/message_lite.h"

Go to the source code of this file.

Classes

class  nanommo::FrameReader

Namespaces

namespace  nanommo

Functions

std::string nanommo::Header (std::size_t size)
std::string nanommo::Frame (const google::protobuf::MessageLite &message)
 The size goes in front, as four bytes in network byte order.

Variables

constexpr std::size_t nanommo::kHeaderSize = 4
constexpr std::size_t nanommo::kMaxMessageSize = 64 * 1024
 Anything bigger is garbage. Without a cap, we might buffer up to 4 GB.