I am setting up a WampServer with Ratchet. Is it possible to add to the loop a timer that calls a WampServer's method every 30 second?
I have tried the following code:
public function addMonitoringTimer(){
$this->loop->addPeriodicTimer(30, function() {
...
$this->wampServer->methodName();
...
});
}
but no timers seems to work.
Note: As this code is a class method, $this is a reference to the class object that has references to the WampServer ($this->wampserver) and the loop used by the WampServer ($this->loop). The method I am calling is not part of the WampServerInterface.