26 #pragma warning(disable : 4127)
32#include <SFML/Network/SelectorBase.hpp>
54 int Size =
static_cast<int>(Socket);
55 if (Size > myMaxSocket)
91 Time.tv_usec = (
static_cast<long>(
Timeout * 1000) % 1000) * 1000;
112 for (
int i = 0;
i < myMaxSocket + 1; ++
i)
123 return static_cast<SocketHelper::SocketType
>(
i);
unsigned int Wait(float Timeout=0.f)
Wait and collect sockets which are ready for reading.
void Remove(SocketHelper::SocketType Socket)
Remove a socket.
SocketHelper::SocketType GetSocketReady(unsigned int Index)
After a call to Wait(), get the Index-th socket which is ready for reading.
void Add(SocketHelper::SocketType Socket)
Add a socket to watch.
SelectorBase()
Default constructor.
void Clear()
Remove all sockets.
static SocketType InvalidSocket()
Return the value of the invalid socket.
Vector2 is an utility class for manipulating 2 dimensional vectors.