|
group2 0.1.0
CSE 125 Group 2
|
Bounded text-chat packet helpers shared by client, server, and tests. More...
#include "ecs/components/ClientId.hpp"#include <cstdint>#include <optional>#include <span>#include <string>#include <string_view>#include <vector>Go to the source code of this file.
Classes | |
| struct | net::chat::ClientTextChat |
| struct | net::chat::ServerTextChat |
Namespaces | |
| namespace | net |
| namespace | net::chat |
Functions | |
| bool | net::chat::isValidUtf8 (std::string_view text) noexcept |
| std::string | net::chat::sanitizeUtf8 (std::string_view text) |
| std::vector< std::uint8_t > | net::chat::encodeClientText (std::uint16_t clientSeq, std::string_view text) |
| std::vector< std::uint8_t > | net::chat::encodeServerText (ClientId sender, std::uint32_t serverSeq, std::string_view text) |
| std::optional< ClientTextChat > | net::chat::decodeClientText (std::span< const std::uint8_t > payload) |
| std::optional< ServerTextChat > | net::chat::decodeServerText (std::span< const std::uint8_t > payload) |
Variables | |
| constexpr std::uint16_t | net::chat::k_maxChatBytes = 240 |
Bounded text-chat packet helpers shared by client, server, and tests.