25#ifndef SFML_SELECTOR_HPP
26#define SFML_SELECTOR_HPP
31#include <SFML/Network/SocketUDP.hpp>
32#include <SFML/Network/SocketTCP.hpp>
33#include <SFML/Network/SelectorBase.hpp>
43template <
typename Type>
54 void Add(Type Socket);
80 unsigned int Wait(
float Timeout = 0.f);
99 typedef std::map<SocketHelper::SocketType, Type> SocketTable;
104 SocketTable mySockets;
107#include <SFML/Network/Selector.inl>
SelectorBase()
Default constructor.
Selector allow reading from multiple sockets without blocking.
void Clear()
Remove all sockets.
void Remove(Type Socket)
Remove a socket.
Type GetSocketReady(unsigned int Index)
After a call to Wait(), get the Index-th socket which is ready for reading.
void Add(Type Socket)
Add a socket to watch.
unsigned int Wait(float Timeout=0.f)
Wait and collect sockets which are ready for reading.