Former-commit-id: ebb7105d949a924f5a454aab4f3704824e8c7e31 [formerly f2b5c057a8ded314be40d1752ad6bc86dcade278] [formerly 6487addceedb75d6f59c9c138b8e3635ea271ba2 [formerly 18f1b6e1d02b0377b382bec327f1df99c1b04f27]] Former-commit-id: 90fc36d0a362d402fd10a23addb1bbb407e4ffb9 [formerly 82f63c8797caafb24fd3e5c8de76b8814ec24585] Former-commit-id: 75da2a9a2dc4b2dbbbd5ad8de986ea58ee199c0f
44 lines
1018 B
C++
44 lines
1018 B
C++
// Copyright (C) 2015 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 <Nazara/Prerequesites.hpp>
|
|
#include <Nazara/Network/AbstractSocket.hpp>
|
|
#include <Nazara/Network/IpAddress.hpp>
|
|
|
|
namespace Nz
|
|
{
|
|
class SocketPollerImpl;
|
|
|
|
class NAZARA_NETWORK_API SocketPoller
|
|
{
|
|
public:
|
|
SocketPoller();
|
|
inline SocketPoller(SocketPoller&& socketPoller);
|
|
~SocketPoller();
|
|
|
|
void Clear();
|
|
|
|
bool IsReady(const AbstractSocket& socket) const;
|
|
bool IsRegistered(const AbstractSocket& socket) const;
|
|
|
|
bool RegisterSocket(AbstractSocket& socket);
|
|
void UnregisterSocket(AbstractSocket& socket);
|
|
|
|
bool Wait(UInt64 msTimeout);
|
|
|
|
inline SocketPoller& operator=(SocketPoller&& socketPoller);
|
|
|
|
private:
|
|
SocketPollerImpl* m_impl;
|
|
};
|
|
}
|
|
|
|
#include <Nazara/Network/SocketPoller.inl>
|
|
|
|
#endif // NAZARA_SOCKETPOLLER_HPP
|