netfwd.hpp 6.1 KB

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