summaryrefslogtreecommitdiff
path: root/doc/html/boost_asio/tutorial/tutdaytime5.html
diff options
context:
space:
mode:
Diffstat (limited to 'doc/html/boost_asio/tutorial/tutdaytime5.html')
-rw-r--r--doc/html/boost_asio/tutorial/tutdaytime5.html10
1 files changed, 9 insertions, 1 deletions
diff --git a/doc/html/boost_asio/tutorial/tutdaytime5.html b/doc/html/boost_asio/tutorial/tutdaytime5.html
index 2cab7f3426..809498b07e 100644
--- a/doc/html/boost_asio/tutorial/tutdaytime5.html
+++ b/doc/html/boost_asio/tutorial/tutdaytime5.html
@@ -31,10 +31,18 @@
This tutorial program shows how to use asio to implement a server application
with UDP.
</p>
+<pre class="programlisting">int main()
+{
+ try
+ {
+ boost::asio::io_context io_context;
+</pre>
<p>
Create an <a class="link" href="../reference/ip__udp/socket.html" title="ip::udp::socket">ip::udp::socket</a>
object to receive requests on UDP port 13.
</p>
+<pre class="programlisting"> udp::socket socket(io_context, udp::endpoint(udp::v4(), 13));
+</pre>
<p>
Wait for a client to initiate contact with us. The remote_endpoint object
will be populated by <a class="link" href="../reference/basic_datagram_socket/receive_from.html" title="basic_datagram_socket::receive_from">ip::udp::socket::receive_from()</a>.
@@ -65,7 +73,7 @@
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
-<td align="right"><div class="copyright-footer">Copyright &#169; 2003-2017 Christopher M. Kohlhoff<p>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2003-2018 Christopher M. Kohlhoff<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>