netfwd.hpp 5.4 KB

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