netfwd.hpp 5.7 KB

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