netfwd.hpp 6.2 KB

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