MCPcopy Create free account
hub / github.com/boostorg/asio / start_receive

Method start_receive

example/cpp11/icmp/ping.cpp:74–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72 }
73
74 void start_receive()
75 {
76 // Discard any data already in the buffer.
77 reply_buffer_.consume(reply_buffer_.size());
78
79 // Wait for a reply. We prepare the buffer to receive up to 64KB.
80 socket_.async_receive(reply_buffer_.prepare(65536),
81 std::bind(&pinger::handle_receive, this, std::placeholders::_2));
82 }
83
84 void handle_receive(std::size_t length)
85 {

Callers

nothing calls this directly

Calls 5

bindFunction · 0.50
consumeMethod · 0.45
sizeMethod · 0.45
async_receiveMethod · 0.45
prepareMethod · 0.45

Tested by

no test coverage detected