MCPcopy Create free account
hub / github.com/chronoxor/CppServer / onReceive

Method onReceive

performance/proto_server.cpp:31–39  ·  view source on GitHub ↗

Protocol handlers

Source from the content-addressed store, hash-verified

29protected:
30 // Protocol handlers
31 void onReceive(const ::simple::SimpleRequest& request) override
32 {
33 // Send response
34 simple::SimpleResponse response;
35 response.id = request.id;
36 response.Hash = 0;
37 response.Length = (uint32_t)request.Message.size();
38 send(response);
39 }
40
41 // Protocol implementation
42 void onReceived(const void* buffer, size_t size) override { receive(buffer, size); }

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected