#include <Selector.hpp>
Public Member Functions | |
Selector () | |
Default constructor. | |
void | Add (Type Socket) |
Add a socket to watch. | |
void | Remove (Type Socket) |
Remove a socket. | |
void | Clear () |
Remove all sockets. | |
bool | GetSocketsReady (std::vector< Type > &Sockets, float Timeout=0.f) |
Remove a socket. |
It's a kind of multiplexer
Definition at line 43 of file Selector.hpp.
sf::Selector< Type >::Selector | ( | ) |
Default constructor.
void sf::Selector< Type >::Add | ( | Type | Socket | ) |
Add a socket to watch.
Socket | : Socket to add |
void sf::Selector< Type >::Remove | ( | Type | Socket | ) |
Remove a socket.
Socket | : Socket to remove |
void sf::Selector< Type >::Clear | ( | ) |
Remove all sockets.
bool sf::Selector< Type >::GetSocketsReady | ( | std::vector< Type > & | Sockets, | |
float | Timeout = 0.f | |||
) |
Remove a socket.
Sockets | : Array to fill with sockets that are ready for reading | |
Timeout | : Timeout, in seconds (0 by default : no timeout) |