axmol/thirdparty/yasio/core/select_interrupter.hpp

45 lines
1.3 KiB
C++
Raw Normal View History

2020-11-16 14:47:43 +08:00
//////////////////////////////////////////////////////////////////////////////////////////
2021-06-14 22:54:50 +08:00
// A multi-platform support c++11 library with focus on asynchronous socket I/O for any
2021-01-14 15:30:18 +08:00
// client application.
2020-11-16 14:47:43 +08:00
//////////////////////////////////////////////////////////////////////////////////////////
//
2023-01-01 17:36:38 +08:00
// Copyright (c) 2012-2023 HALX99 (halx99 at live dot com)
2020-11-16 14:47:43 +08:00
// Copyright (c) 2003-2020 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
// see also: https://github.com/chriskohlhoff/asio
//
#ifndef YASIO__SELECT_INTERRUPTER_HPP
#define YASIO__SELECT_INTERRUPTER_HPP
2021-06-14 22:54:50 +08:00
#include "yasio/compiler/feature_test.hpp"
2020-11-16 14:47:43 +08:00
#if defined(_WIN32)
2023-05-14 17:06:43 +08:00
# include "yasio/core/socket_select_interrupter.hpp"
2020-11-16 14:47:43 +08:00
#elif defined(__linux__)
2023-05-14 17:06:43 +08:00
# include "yasio/core/eventfd_select_interrupter.hpp"
2020-11-16 14:47:43 +08:00
#else
2023-05-14 17:06:43 +08:00
# include "yasio/core/pipe_select_interrupter.hpp"
2020-11-16 14:47:43 +08:00
#endif
namespace yasio
{
2021-06-14 22:54:50 +08:00
YASIO__NS_INLINE
2020-11-16 14:47:43 +08:00
namespace inet
{
#if defined(_WIN32)
typedef socket_select_interrupter select_interrupter;
#elif defined(__linux__)
typedef eventfd_select_interrupter select_interrupter;
#else
typedef pipe_select_interrupter select_interrupter;
#endif
} // namespace inet
} // namespace yasio
#endif // YASIO__SELECT_INTERRUPTER_HPP