1<html> 2<head> 3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 4<title>Tutorial</title> 5<link rel="stylesheet" href="../../../doc/src/boostbook.css" type="text/css"> 6<meta name="generator" content="DocBook XSL Stylesheets V1.79.1"> 7<link rel="home" href="../boost_asio.html" title="Boost.Asio"> 8<link rel="up" href="../boost_asio.html" title="Boost.Asio"> 9<link rel="prev" href="using.html" title="Using Boost.Asio"> 10<link rel="next" href="tutorial/tuttimer1.html" title="Timer.1 - Using a timer synchronously"> 11</head> 12<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> 13<table cellpadding="2" width="100%"><tr> 14<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../boost.png"></td> 15<td align="center"><a href="../../../index.html">Home</a></td> 16<td align="center"><a href="../../../libs/libraries.htm">Libraries</a></td> 17<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> 18<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> 19<td align="center"><a href="../../../more/index.htm">More</a></td> 20</tr></table> 21<hr> 22<div class="spirit-nav"> 23<a accesskey="p" href="using.html"><img src="../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../boost_asio.html"><img src="../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../boost_asio.html"><img src="../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="tutorial/tuttimer1.html"><img src="../../../doc/src/images/next.png" alt="Next"></a> 24</div> 25<div class="section"> 26<div class="titlepage"><div><div><h2 class="title" style="clear: both"> 27<a name="boost_asio.tutorial"></a><a class="link" href="tutorial.html" title="Tutorial">Tutorial</a> 28</h2></div></div></div> 29<h4> 30<a name="boost_asio.tutorial.h0"></a> 31 <span class="phrase"><a name="boost_asio.tutorial.basic_skills"></a></span><a class="link" href="tutorial.html#boost_asio.tutorial.basic_skills">Basic 32 Skills</a> 33 </h4> 34<p> 35 The tutorial programs in this first section introduce the fundamental concepts 36 required to use the asio toolkit. Before plunging into the complex world of 37 network programming, these tutorial programs illustrate the basic skills using 38 simple asynchronous timers. 39 </p> 40<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> 41<li class="listitem"> 42 <a class="link" href="tutorial/tuttimer1.html" title="Timer.1 - Using a timer synchronously">Timer.1 - Using a timer synchronously</a> 43 </li> 44<li class="listitem"> 45 <a class="link" href="tutorial/tuttimer2.html" title="Timer.2 - Using a timer asynchronously">Timer.2 - Using a timer asynchronously</a> 46 </li> 47<li class="listitem"> 48 <a class="link" href="tutorial/tuttimer3.html" title="Timer.3 - Binding arguments to a handler">Timer.3 - Binding arguments 49 to a handler</a> 50 </li> 51<li class="listitem"> 52 <a class="link" href="tutorial/tuttimer4.html" title="Timer.4 - Using a member function as a handler">Timer.4 - Using a member 53 function as a handler</a> 54 </li> 55<li class="listitem"> 56 <a class="link" href="tutorial/tuttimer5.html" title="Timer.5 - Synchronising handlers in multithreaded programs">Timer.5 - Synchronising handlers 57 in multithreaded programs</a> 58 </li> 59</ul></div> 60<h4> 61<a name="boost_asio.tutorial.h1"></a> 62 <span class="phrase"><a name="boost_asio.tutorial.introduction_to_sockets"></a></span><a class="link" href="tutorial.html#boost_asio.tutorial.introduction_to_sockets">Introduction 63 to Sockets</a> 64 </h4> 65<p> 66 The tutorial programs in this section show how to use asio to develop simple 67 client and server programs. These tutorial programs are based around the <a href="http://www.ietf.org/rfc/rfc867.txt" target="_top">daytime</a> protocol, which supports 68 both TCP and UDP. 69 </p> 70<p> 71 The first three tutorial programs implement the daytime protocol using TCP. 72 </p> 73<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> 74<li class="listitem"> 75 <a class="link" href="tutorial/tutdaytime1.html" title="Daytime.1 - A synchronous TCP daytime client">Daytime.1 - A synchronous 76 TCP daytime client</a> 77 </li> 78<li class="listitem"> 79 <a class="link" href="tutorial/tutdaytime2.html" title="Daytime.2 - A synchronous TCP daytime server">Daytime.2 - A synchronous 80 TCP daytime server</a> 81 </li> 82<li class="listitem"> 83 <a class="link" href="tutorial/tutdaytime3.html" title="Daytime.3 - An asynchronous TCP daytime server">Daytime.3 - An asynchronous 84 TCP daytime server</a> 85 </li> 86</ul></div> 87<p> 88 The next three tutorial programs implement the daytime protocol using UDP. 89 </p> 90<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> 91<li class="listitem"> 92 <a class="link" href="tutorial/tutdaytime4.html" title="Daytime.4 - A synchronous UDP daytime client">Daytime.4 - A synchronous 93 UDP daytime client</a> 94 </li> 95<li class="listitem"> 96 <a class="link" href="tutorial/tutdaytime5.html" title="Daytime.5 - A synchronous UDP daytime server">Daytime.5 - A synchronous 97 UDP daytime server</a> 98 </li> 99<li class="listitem"> 100 <a class="link" href="tutorial/tutdaytime6.html" title="Daytime.6 - An asynchronous UDP daytime server">Daytime.6 - An asynchronous 101 UDP daytime server</a> 102 </li> 103</ul></div> 104<p> 105 The last tutorial program in this section demonstrates how asio allows the 106 TCP and UDP servers to be easily combined into a single program. 107 </p> 108<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"> 109 <a class="link" href="tutorial/tutdaytime7.html" title="Daytime.7 - A combined TCP/UDP asynchronous server">Daytime.7 - A combined 110 TCP/UDP asynchronous server</a> 111 </li></ul></div> 112</div> 113<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> 114<td align="left"></td> 115<td align="right"><div class="copyright-footer">Copyright © 2003-2020 Christopher M. 116 Kohlhoff<p> 117 Distributed under the Boost Software License, Version 1.0. (See accompanying 118 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>) 119 </p> 120</div></td> 121</tr></table> 122<hr> 123<div class="spirit-nav"> 124<a accesskey="p" href="using.html"><img src="../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../boost_asio.html"><img src="../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../boost_asio.html"><img src="../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="tutorial/tuttimer1.html"><img src="../../../doc/src/images/next.png" alt="Next"></a> 125</div> 126</body> 127</html> 128