#include <SFML/Config.h>
#include <SFML/Network/Types.h>
Go to the source code of this file.
Functions | |
CSFML_API sfSelectorTCP * | sfSelectorTCP_Create () |
Create a new selector. | |
CSFML_API sfSelectorUDP * | sfSelectorUDP_Create () |
CSFML_API void | sfSelectorTCP_Destroy (sfSelectorTCP *Selector) |
Destroy an existing selector. | |
CSFML_API void | sfSelectorUDP_Destroy (sfSelectorUDP *Selector) |
CSFML_API void | sfSelectorTCP_Add (sfSelectorTCP *Selector, sfSocketTCP *Socket) |
Add a socket to watch to a selector. | |
CSFML_API void | sfSelectorUDP_Add (sfSelectorUDP *Selector, sfSocketUDP *Socket) |
CSFML_API void | sfSelectorTCP_Remove (sfSelectorTCP *Selector, sfSocketTCP *Socket) |
Remove a socket from a selector. | |
CSFML_API void | sfSelectorUDP_Remove (sfSelectorUDP *Selector, sfSocketUDP *Socket) |
CSFML_API void | sfSelectorTCP_Clear (sfSelectorTCP *Selector) |
Remove all sockets from a selector. | |
CSFML_API void | sfSelectorUDP_Clear (sfSelectorUDP *Selector) |
CSFML_API unsigned int | sfSelectorTCP_Wait (sfSelectorTCP *Selector, float Timeout) |
Wait and collect sockets which are ready for reading. | |
CSFML_API unsigned int | sfSelectorUDP_Wait (sfSelectorUDP *Selector, float Timeout) |
CSFML_API sfSocketTCP * | sfSelectorTCP_GetSocketReady (sfSelectorTCP *Selector, unsigned int Index) |
After a call to Wait(), get the Index-th socket which is ready for reading. | |
CSFML_API sfSocketUDP * | sfSelectorUDP_GetSocketReady (sfSelectorUDP *Selector, unsigned int Index) |
CSFML_API void sfSelectorTCP_Add | ( | sfSelectorTCP * | Selector, | |
sfSocketTCP * | Socket | |||
) |
Add a socket to watch to a selector.
Selector | : Selector to add the socket to | |
Socket | : Socket to add |
CSFML_API void sfSelectorTCP_Clear | ( | sfSelectorTCP * | Selector | ) |
Remove all sockets from a selector.
Selector | : Selector to remove the socket from |
CSFML_API sfSelectorTCP* sfSelectorTCP_Create | ( | ) |
Create a new selector.
CSFML_API void sfSelectorTCP_Destroy | ( | sfSelectorTCP * | Selector | ) |
Destroy an existing selector.
Selector | : Selector to delete |
CSFML_API sfSocketTCP* sfSelectorTCP_GetSocketReady | ( | sfSelectorTCP * | Selector, | |
unsigned int | Index | |||
) |
After a call to Wait(), get the Index-th socket which is ready for reading.
The total number of sockets ready is the integer returned by the previous call to Wait()
Selector | : Selector to check | |
Index | : Index of the socket to get |
CSFML_API void sfSelectorTCP_Remove | ( | sfSelectorTCP * | Selector, | |
sfSocketTCP * | Socket | |||
) |
Remove a socket from a selector.
Selector | : Selector to remove the socket from | |
Socket | : Socket to remove |
CSFML_API unsigned int sfSelectorTCP_Wait | ( | sfSelectorTCP * | Selector, | |
float | Timeout | |||
) |
Wait and collect sockets which are ready for reading.
This functions will return either when at least one socket is ready, or when the given time is out
Selector | : Selector to check | |
Timeout | : Maximum time to wait, in seconds (0 to disable timeout) |
CSFML_API void sfSelectorUDP_Add | ( | sfSelectorUDP * | Selector, | |
sfSocketUDP * | Socket | |||
) |
CSFML_API void sfSelectorUDP_Clear | ( | sfSelectorUDP * | Selector | ) |
CSFML_API sfSelectorUDP* sfSelectorUDP_Create | ( | ) |
CSFML_API void sfSelectorUDP_Destroy | ( | sfSelectorUDP * | Selector | ) |
CSFML_API sfSocketUDP* sfSelectorUDP_GetSocketReady | ( | sfSelectorUDP * | Selector, | |
unsigned int | Index | |||
) |
CSFML_API void sfSelectorUDP_Remove | ( | sfSelectorUDP * | Selector, | |
sfSocketUDP * | Socket | |||
) |
CSFML_API unsigned int sfSelectorUDP_Wait | ( | sfSelectorUDP * | Selector, | |
float | Timeout | |||
) |