MCPcopy Create free account
hub / github.com/caozhiyi/CppNet / ReadFunc

Function ReadFunc

test/echo/EchoClient.cpp:26–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24}
25
26void ReadFunc(const Handle& handle, base::CBuffer* data, uint32_t len, uint32_t error) {
27 if (error != CEC_SUCCESS) {
28 std::cout << "something err while read : " << error << std::endl;
29 } else {
30 // print
31 std::cout << *(data) << std::endl;
32 data->Clear();
33 }
34}
35
36void ConnectFunc(const Handle& handle, uint32_t error) {
37 if (error != CEC_SUCCESS) {

Callers

nothing calls this directly

Calls 1

ClearMethod · 0.45

Tested by

no test coverage detected