reactor.hpp 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. //
  2. // detail/reactor.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_DETAIL_REACTOR_HPP
  11. #define ASIO_DETAIL_REACTOR_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_IOCP) || defined(ASIO_WINDOWS_RUNTIME)
  17. # include "asio/detail/null_reactor.hpp"
  18. #elif defined(ASIO_HAS_IO_URING_AS_DEFAULT)
  19. # include "asio/detail/null_reactor.hpp"
  20. #elif defined(ASIO_HAS_EPOLL)
  21. # include "asio/detail/epoll_reactor.hpp"
  22. #elif defined(ASIO_HAS_KQUEUE)
  23. # include "asio/detail/kqueue_reactor.hpp"
  24. #elif defined(ASIO_HAS_DEV_POLL)
  25. # include "asio/detail/dev_poll_reactor.hpp"
  26. #else
  27. # include "asio/detail/select_reactor.hpp"
  28. #endif
  29. namespace asio {
  30. namespace detail {
  31. #if defined(ASIO_HAS_IOCP) || defined(ASIO_WINDOWS_RUNTIME)
  32. typedef null_reactor reactor;
  33. #elif defined(ASIO_HAS_IO_URING_AS_DEFAULT)
  34. typedef null_reactor reactor;
  35. #elif defined(ASIO_HAS_EPOLL)
  36. typedef epoll_reactor reactor;
  37. #elif defined(ASIO_HAS_KQUEUE)
  38. typedef kqueue_reactor reactor;
  39. #elif defined(ASIO_HAS_DEV_POLL)
  40. typedef dev_poll_reactor reactor;
  41. #else
  42. typedef select_reactor reactor;
  43. #endif
  44. } // namespace detail
  45. } // namespace asio
  46. #endif // ASIO_DETAIL_REACTOR_HPP