axmol/thirdparty/yasio/core/io_watcher.hpp

43 lines
1.3 KiB
C++
Raw Normal View History

2023-04-17 00:28:05 +08:00
//////////////////////////////////////////////////////////////////////////////////////////
// A multi-platform support c++11 library with focus on asynchronous socket I/O for any
// client application.
//////////////////////////////////////////////////////////////////////////////////////////
//
//
// Copyright (c) 2012-2023 HALX99 (halx99 at live dot com)
#pragma once
2023-05-14 22:39:05 +08:00
#include "yasio/config.hpp"
2023-04-17 00:28:05 +08:00
#if YASIO__HAS_KQUEUE && !defined(YASIO_DISABLE_KQUEUE)
2023-05-14 17:06:43 +08:00
# include "yasio/core/kqueue_io_watcher.hpp"
2023-04-17 00:28:05 +08:00
#elif YASIO__HAS_EPOLL && !defined(YASIO_DISABLE_EPOLL)
2023-05-14 17:06:43 +08:00
# include "yasio/core/epoll_io_watcher.hpp"
2023-04-22 20:27:21 +08:00
#elif YASIO__HAS_EVPORT && !defined(YASIO_DISABLE_EVPORT)
2023-05-14 17:06:43 +08:00
# include "yasio/core/evport_io_watcher.hpp"
2023-04-17 00:28:05 +08:00
#elif !defined(YASIO_DISABLE_POLL)
2023-05-14 17:06:43 +08:00
# include "yasio/core/poll_io_watcher.hpp"
2023-04-17 00:28:05 +08:00
#else
2023-05-14 17:06:43 +08:00
# include "yasio/core/select_io_watcher.hpp"
2023-04-17 00:28:05 +08:00
#endif
namespace yasio
{
YASIO__NS_INLINE
namespace inet
{
#if YASIO__HAS_KQUEUE && !defined(YASIO_DISABLE_KQUEUE)
using io_watcher = kqueue_io_watcher;
#elif YASIO__HAS_EPOLL && !defined(YASIO_DISABLE_EPOLL)
using io_watcher = epoll_io_watcher;
2023-04-22 20:27:21 +08:00
#elif YASIO__HAS_EVPORT && !defined(YASIO_DISABLE_EVPORT)
using io_watcher = evport_io_watcher;
2023-04-17 00:28:05 +08:00
#elif !defined(YASIO_DISABLE_POLL)
using io_watcher = poll_io_watcher;
#else
using io_watcher = select_io_watcher;
#endif
} // namespace inet
} // namespace yasio