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

Method do_receive

example/cpp11/multicast/receiver.cpp:41–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39
40private:
41 void do_receive()
42 {
43 socket_.async_receive_from(
44 boost::asio::buffer(data_), sender_endpoint_,
45 [this](boost::system::error_code ec, std::size_t length)
46 {
47 if (!ec)
48 {
49 std::cout.write(data_.data(), length);
50 std::cout << std::endl;
51
52 do_receive();
53 }
54 });
55 }
56
57 boost::asio::ip::udp::socket socket_;
58 boost::asio::ip::udp::endpoint sender_endpoint_;

Callers

nothing calls this directly

Calls 4

bufferFunction · 0.85
async_receive_fromMethod · 0.45
writeMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected