MCPcopy Create free account
hub / github.com/ashvardanian/less_slow.cpp / packet_modify

Function packet_modify

less_slow.cpp:6671–6675  ·  view source on GitHub ↗

* @brief Emulates some message processing logic, that will update the `input` packet * and write the result to the `output` buffer, returning the output length. * * This function will be called on the server size to reply each message. * It is also called on the client side to validate the received response. */

Source from the content-addressed store, hash-verified

6669 * It is also called on the client side to validate the received response.
6670 */
6671std::size_t packet_modify(char const *input, std::size_t input_length, char *output) {
6672 // Echo the input packet back. Any wiser suggestions?
6673 std::memcpy(output, input, input_length);
6674 return input_length;
6675}
6676
6677#pragma region POSIX
6678

Callers 1

operator()Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected