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

Method onReceived

performance/udp_echo_server.cpp:28–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26 }
27
28 void onReceived(const asio::ip::udp::endpoint& endpoint, const void* buffer, size_t size) override
29 {
30 // Continue receive datagrams
31 if (size == 0)
32 {
33 ReceiveAsync();
34 return;
35 }
36
37 // Resend the message back to the client
38 SendAsync(endpoint, buffer, size);
39 }
40
41 void onSent(const asio::ip::udp::endpoint& endpoint, size_t sent) override
42 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected