socket.receive_from(
        boost::asio::buffer(recv_buf), sender_endpoint);

    std::cout.write(recv_buf.data(), len);
  }
  catch (std::exception&amp; e)
  {
    std::cerr &lt;&lt; e.what() &lt;&lt; std::endl;
  }

  return 0;
}
</pre>
<p>
          Return to <a class="link" href="../tutdaytime4.html" title="Daytime.4 - A synchronous UDP daytime client">Daytime.4 - A
          synchronous UDP daytime client</a>
        </p>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision"