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> 43 template <
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> 116 #endif // SFML_SELECTOR_HPP Private base class for selectors.
void Clear()
Remove all sockets.
void Add(Type Socket)
Add a socket to watch.
Type GetSocketReady(unsigned int Index)
After a call to Wait(), get the Index-th socket which is ready for reading.
Selector allow reading from multiple sockets without blocking.
unsigned int Wait(float Timeout=0.f)
Wait and collect sockets which are ready for reading.
void Remove(Type Socket)
Remove a socket.