// Copyright (C) 2020 Jérôme Leclercq // This file is part of the "Nazara Engine - Network module" // For conditions of distribution and use, see copyright notice in Config.hpp #pragma once #ifndef NAZARA_SOCKETPOLLER_HPP #define NAZARA_SOCKETPOLLER_HPP #include #include #include namespace Nz { class SocketPollerImpl; class NAZARA_NETWORK_API SocketPoller { public: SocketPoller(); SocketPoller(SocketPoller&&) noexcept = default; ~SocketPoller(); void Clear(); bool IsReadyToRead(const AbstractSocket& socket) const; bool IsReadyToWrite(const AbstractSocket& socket) const; bool IsRegistered(const AbstractSocket& socket) const; bool RegisterSocket(AbstractSocket& socket, SocketPollEventFlags eventFlags); void UnregisterSocket(AbstractSocket& socket); unsigned int Wait(int msTimeout, SocketError* error = nullptr); SocketPoller& operator=(SocketPoller&&) noexcept = default; private: MovablePtr m_impl; }; } #include #endif // NAZARA_SOCKETPOLLER_HPP