group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
net::chat Namespace Reference

Classes

struct  ClientTextChat
struct  ServerTextChat

Functions

bool isValidUtf8 (std::string_view text) noexcept
std::string sanitizeUtf8 (std::string_view text)
std::vector< std::uint8_t > encodeClientText (std::uint16_t clientSeq, std::string_view text)
std::vector< std::uint8_t > encodeServerText (ClientId sender, std::uint32_t serverSeq, std::string_view text)
std::optional< ClientTextChatdecodeClientText (std::span< const std::uint8_t > payload)
std::optional< ServerTextChatdecodeServerText (std::span< const std::uint8_t > payload)

Variables

constexpr std::uint16_t k_maxChatBytes = 240

Function Documentation

◆ decodeClientText()

std::optional< ClientTextChat > net::chat::decodeClientText ( std::span< const std::uint8_t > payload)
nodiscard
Here is the call graph for this function:
Here is the caller graph for this function:

◆ decodeServerText()

std::optional< ServerTextChat > net::chat::decodeServerText ( std::span< const std::uint8_t > payload)
nodiscard
Here is the call graph for this function:
Here is the caller graph for this function:

◆ encodeClientText()

std::vector< std::uint8_t > net::chat::encodeClientText ( std::uint16_t clientSeq,
std::string_view text )
nodiscard
Here is the call graph for this function:
Here is the caller graph for this function:

◆ encodeServerText()

std::vector< std::uint8_t > net::chat::encodeServerText ( ClientId sender,
std::uint32_t serverSeq,
std::string_view text )
nodiscard
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isValidUtf8()

bool net::chat::isValidUtf8 ( std::string_view text)
nodiscardnoexcept
Here is the caller graph for this function:

◆ sanitizeUtf8()

std::string net::chat::sanitizeUtf8 ( std::string_view text)
nodiscard
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ k_maxChatBytes

std::uint16_t net::chat::k_maxChatBytes = 240
inlineconstexpr