tutorial.html 6.1 KB

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