#include <ControllerPingSender.hpp>
Public Member Functions | |
ControllerPingSender (WatchedControllers &controllerList, int socket, int pingDelayInMs) | |
Creates a new ControllerPingSender on the given controller list with the given frequency. | |
void | run () |
Starts pinging controllers. | |
void | stop () |
Stops the thread. |
CarobNS::ControllerPingSender::ControllerPingSender | ( | WatchedControllers & | controllerList, | |
int | socket, | |||
int | pingDelayInMs | |||
) |
Creates a new ControllerPingSender
on the given controller list with the given frequency.
controllerList | controllers to ping. Should never be null | |
socket | open socket to use for sending pings | |
pingDelayInMs | time to wait between two successive pings |
void CarobNS::ControllerPingSender::run | ( | ) |
Starts pinging controllers.
Controllers will be ping with an interval of at least pingDelayInMs. But as this function is synchronized on the controller list it can be slowed down if controllers are added/removed, raising up the ping delay