sf::Selector< Type > Class Template Reference

Selector allow reading from multiple sockets without blocking. More...

#include <Selector.hpp>

List of all members.


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.

Detailed Description

template<typename Type>
class sf::Selector< Type >

Selector allow reading from multiple sockets without blocking.

It's a kind of multiplexer

Definition at line 43 of file Selector.hpp.


Constructor & Destructor Documentation

template<typename Type>
sf::Selector< Type >::Selector (  ) 

Default constructor.


Member Function Documentation

template<typename Type>
void sf::Selector< Type >::Add ( Type  Socket  ) 

Add a socket to watch.

Parameters:
Socket : Socket to add

template<typename Type>
void sf::Selector< Type >::Remove ( Type  Socket  ) 

Remove a socket.

Parameters:
Socket : Socket to remove

template<typename Type>
void sf::Selector< Type >::Clear (  ) 

Remove all sockets.

template<typename Type>
bool sf::Selector< Type >::GetSocketsReady ( std::vector< Type > &  Sockets,
float  Timeout = 0.f 
)

Remove a socket.

Parameters:
Sockets : Array to fill with sockets that are ready for reading
Timeout : Timeout, in seconds (0 by default : no timeout)
Returns:
True if a socket is ready, false if time was out


The documentation for this class was generated from the following file: