call() public method

Send the prepared response.
public call ( ) : Kraken\Promise\PromiseInterface
return Kraken\Promise\PromiseInterface
Example #1
0
 /**
  *
  */
 private function registerPeriodicTimers()
 {
     $this->reqsHelperTimer = $this->getLoop()->addPeriodicTimer(0.1, function () {
         $this->expireRequests();
     });
     $this->repsHelperTimer = $this->getLoop()->addPeriodicTimer(0.1, function () {
         $this->expireResponses();
         $unfinished = $this->unfinishedResponses();
         foreach ($unfinished as $response) {
             $protocol = new Protocol('', $response->getPid(), '', $response->getAlias(), '', '', $this->getTime());
             $response = new Response($this, $protocol, new TaskIncompleteException("Task unfinished."));
             $response->call();
         }
     });
 }