*/
public function executeTask () {
// Do we have something to handle?
- if ($this->getPackageInstance()->isNewRawDataPending($this->getListenerPoolInstance())) {
- // We have to handle raw data from the socket
- $this->getPackageInstance()->handleIncomingDecodedData();
+ if ($this->getPackageInstance()->isNewPackageArrived()) {
+ // Okay, then handle newly arrived package
+ $this->getPackageInstance()->handleNewlyArrivedPackage();
} elseif ($this->getPackageInstance()->isIncomingDecodedDataHandled()) {
/*
* We have handled decoded data so we should validate it, if we have
* network package.
*/
$this->getPackageInstance()->assembleDecodedDataToPackage();
- } elseif ($this->getPackageInstance()->isNewPackageArrived()) {
- // Okay, then handle newly arrived package
- $this->getPackageInstance()->handleNewlyArrivedPackage();
+ } elseif ($this->getPackageInstance()->isNewRawDataPending($this->getListenerPoolInstance())) {
+ // We have to handle raw data from the socket
+ $this->getPackageInstance()->handleIncomingDecodedData();
} // END - if
}
}