netfwd.hpp 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256
  1. //
  2. // ts/netfwd.hpp
  3. // ~~~~~~~~~~~~~
  4. //
  5. // Copyright (c) 2003-2021 Christopher M. Kohlhoff (chris at kohlhoff dot com)
  6. //
  7. // Distributed under the Boost Software License, Version 1.0. (See accompanying
  8. // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  9. //
  10. #ifndef BOOST_ASIO_TS_NETFWD_HPP
  11. #define BOOST_ASIO_TS_NETFWD_HPP
  12. #if defined(_MSC_VER) && (_MSC_VER >= 1200)
  13. # pragma once
  14. #endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
  15. #include <boost/asio/detail/config.hpp>
  16. #if defined(BOOST_ASIO_HAS_CHRONO)
  17. # include <boost/asio/detail/chrono.hpp>
  18. #endif // defined(BOOST_ASIO_HAS_CHRONO)
  19. #if defined(BOOST_ASIO_HAS_BOOST_DATE_TIME)
  20. # include <boost/asio/detail/date_time_fwd.hpp>
  21. #endif // defined(BOOST_ASIO_HAS_BOOST_DATE_TIME)
  22. #if !defined(BOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT)
  23. #include <boost/asio/execution/blocking.hpp>
  24. #include <boost/asio/execution/outstanding_work.hpp>
  25. #include <boost/asio/execution/relationship.hpp>
  26. #endif // !defined(BOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT)
  27. #if !defined(GENERATING_DOCUMENTATION)
  28. #include <boost/asio/detail/push_options.hpp>
  29. namespace boost {
  30. namespace asio {
  31. class execution_context;
  32. template <typename T, typename Executor>
  33. class executor_binder;
  34. #if !defined(BOOST_ASIO_EXECUTOR_WORK_GUARD_DECL)
  35. #define BOOST_ASIO_EXECUTOR_WORK_GUARD_DECL
  36. template <typename Executor, typename = void, typename = void>
  37. class executor_work_guard;
  38. #endif // !defined(BOOST_ASIO_EXECUTOR_WORK_GUARD_DECL)
  39. template <typename Blocking, typename Relationship, typename Allocator>
  40. class basic_system_executor;
  41. #if defined(BOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT)
  42. class executor;
  43. typedef executor any_io_executor;
  44. #else // defined(BOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT)
  45. namespace execution {
  46. #if !defined(BOOST_ASIO_EXECUTION_ANY_EXECUTOR_FWD_DECL)
  47. #define BOOST_ASIO_EXECUTION_ANY_EXECUTOR_FWD_DECL
  48. #if defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
  49. template <typename... SupportableProperties>
  50. class any_executor;
  51. #else // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
  52. template <typename = void, typename = void, typename = void,
  53. typename = void, typename = void, typename = void,
  54. typename = void, typename = void, typename = void>
  55. class any_executor;
  56. #endif // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
  57. #endif // !defined(BOOST_ASIO_EXECUTION_ANY_EXECUTOR_FWD_DECL)
  58. template <typename U>
  59. struct context_as_t;
  60. template <typename Property>
  61. struct prefer_only;
  62. } // namespace execution
  63. class any_io_executor;
  64. #endif // defined(BOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT)
  65. template <typename Executor>
  66. class strand;
  67. class io_context;
  68. template <typename Clock>
  69. struct wait_traits;
  70. #if defined(BOOST_ASIO_HAS_BOOST_DATE_TIME)
  71. template <typename Time>
  72. struct time_traits;
  73. #endif // defined(BOOST_ASIO_HAS_BOOST_DATE_TIME)
  74. #if !defined(BOOST_ASIO_BASIC_WAITABLE_TIMER_FWD_DECL)
  75. #define BOOST_ASIO_BASIC_WAITABLE_TIMER_FWD_DECL
  76. template <typename Clock,
  77. typename WaitTraits = wait_traits<Clock>,
  78. typename Executor = any_io_executor>
  79. class basic_waitable_timer;
  80. #endif // !defined(BOOST_ASIO_BASIC_WAITABLE_TIMER_FWD_DECL)
  81. #if defined(BOOST_ASIO_HAS_CHRONO)
  82. typedef basic_waitable_timer<chrono::system_clock> system_timer;
  83. typedef basic_waitable_timer<chrono::steady_clock> steady_timer;
  84. typedef basic_waitable_timer<chrono::high_resolution_clock>
  85. high_resolution_timer;
  86. #endif // defined(BOOST_ASIO_HAS_CHRONO)
  87. #if !defined(BOOST_ASIO_BASIC_SOCKET_FWD_DECL)
  88. #define BOOST_ASIO_BASIC_SOCKET_FWD_DECL
  89. template <typename Protocol, typename Executor = any_io_executor>
  90. class basic_socket;
  91. #endif // !defined(BOOST_ASIO_BASIC_SOCKET_FWD_DECL)
  92. #if !defined(BOOST_ASIO_BASIC_DATAGRAM_SOCKET_FWD_DECL)
  93. #define BOOST_ASIO_BASIC_DATAGRAM_SOCKET_FWD_DECL
  94. template <typename Protocol, typename Executor = any_io_executor>
  95. class basic_datagram_socket;
  96. #endif // !defined(BOOST_ASIO_BASIC_DATAGRAM_SOCKET_FWD_DECL)
  97. #if !defined(BOOST_ASIO_BASIC_STREAM_SOCKET_FWD_DECL)
  98. #define BOOST_ASIO_BASIC_STREAM_SOCKET_FWD_DECL
  99. // Forward declaration with defaulted arguments.
  100. template <typename Protocol, typename Executor = any_io_executor>
  101. class basic_stream_socket;
  102. #endif // !defined(BOOST_ASIO_BASIC_STREAM_SOCKET_FWD_DECL)
  103. #if !defined(BOOST_ASIO_BASIC_SOCKET_ACCEPTOR_FWD_DECL)
  104. #define BOOST_ASIO_BASIC_SOCKET_ACCEPTOR_FWD_DECL
  105. template <typename Protocol, typename Executor = any_io_executor>
  106. class basic_socket_acceptor;
  107. #endif // !defined(BOOST_ASIO_BASIC_SOCKET_ACCEPTOR_FWD_DECL)
  108. #if !defined(BOOST_ASIO_BASIC_SOCKET_STREAMBUF_FWD_DECL)
  109. #define BOOST_ASIO_BASIC_SOCKET_STREAMBUF_FWD_DECL
  110. // Forward declaration with defaulted arguments.
  111. template <typename Protocol,
  112. #if defined(BOOST_ASIO_HAS_BOOST_DATE_TIME) \
  113. || defined(GENERATING_DOCUMENTATION)
  114. typename Clock = boost::posix_time::ptime,
  115. typename WaitTraits = time_traits<Clock> >
  116. #else
  117. typename Clock = chrono::steady_clock,
  118. typename WaitTraits = wait_traits<Clock> >
  119. #endif
  120. class basic_socket_streambuf;
  121. #endif // !defined(BOOST_ASIO_BASIC_SOCKET_STREAMBUF_FWD_DECL)
  122. #if !defined(BOOST_ASIO_BASIC_SOCKET_IOSTREAM_FWD_DECL)
  123. #define BOOST_ASIO_BASIC_SOCKET_IOSTREAM_FWD_DECL
  124. // Forward declaration with defaulted arguments.
  125. template <typename Protocol,
  126. #if defined(BOOST_ASIO_HAS_BOOST_DATE_TIME) \
  127. || defined(GENERATING_DOCUMENTATION)
  128. typename Clock = boost::posix_time::ptime,
  129. typename WaitTraits = time_traits<Clock> >
  130. #else
  131. typename Clock = chrono::steady_clock,
  132. typename WaitTraits = wait_traits<Clock> >
  133. #endif
  134. class basic_socket_iostream;
  135. #endif // !defined(BOOST_ASIO_BASIC_SOCKET_IOSTREAM_FWD_DECL)
  136. namespace ip {
  137. class address;
  138. class address_v4;
  139. class address_v6;
  140. template <typename Address>
  141. class basic_address_iterator;
  142. typedef basic_address_iterator<address_v4> address_v4_iterator;
  143. typedef basic_address_iterator<address_v6> address_v6_iterator;
  144. template <typename Address>
  145. class basic_address_range;
  146. typedef basic_address_range<address_v4> address_v4_range;
  147. typedef basic_address_range<address_v6> address_v6_range;
  148. class network_v4;
  149. class network_v6;
  150. template <typename InternetProtocol>
  151. class basic_endpoint;
  152. template <typename InternetProtocol>
  153. class basic_resolver_entry;
  154. template <typename InternetProtocol>
  155. class basic_resolver_results;
  156. #if !defined(BOOST_ASIO_IP_BASIC_RESOLVER_FWD_DECL)
  157. #define BOOST_ASIO_IP_BASIC_RESOLVER_FWD_DECL
  158. template <typename InternetProtocol, typename Executor = any_io_executor>
  159. class basic_resolver;
  160. #endif // !defined(BOOST_ASIO_IP_BASIC_RESOLVER_FWD_DECL)
  161. class tcp;
  162. class udp;
  163. } // namespace ip
  164. } // namespace asio
  165. } // namespace boost
  166. #include <boost/asio/detail/pop_options.hpp>
  167. #endif // !defined(GENERATING_DOCUMENTATION)
  168. #endif // BOOST_ASIO_TS_NETFWD_HPP