]> git.mxchange.org Git - hub.git/commitdiff
Switched around sub-tasks, commented out noisy debug line
authorRoland Häder <roland@mxchange.org>
Fri, 23 Mar 2012 22:19:18 +0000 (22:19 +0000)
committerRoland Häder <roland@mxchange.org>
Fri, 23 Mar 2012 22:19:18 +0000 (22:19 +0000)
application/hub/main/package/fragmenter/class_PackageFragmenter.php
application/hub/main/tasks/network/class_NetworkPackageReaderTask.php
application/hub/main/tasks/network/class_NetworkPackageWriterTask.php

index 622e56f34cdf1ccc391a5ab3742b45144ee1c6a8..9b1b8d52dd027e39a26be4331b0c3aa480ac5ae2 100644 (file)
@@ -382,7 +382,7 @@ class PackageFragmenter extends BaseFrameworkSystem implements Fragmentable, Reg
                assert(strlen($rawData) <= NetworkPackage::TCP_PACKAGE_SIZE);
 
                // Add it to the array
-               /* NOISY-DEBUG: */ $this->debugOutput('FRAGMENTER: Adding ' . strlen($rawData) . ' bytes of a chunk ...');
+               //* NOISY-DEBUG: */ $this->debugOutput('FRAGMENTER: Adding ' . strlen($rawData) . ' bytes of a chunk ...');
                $this->chunks[$finalHash][]      = $rawData;
                $this->chunkHashes[$finalHash][] = $rawDataHash;
        }
index 7e10c0e84044dee71e3d4a12a34aaed4689c2ddc..da672097a97d43e8b093c26151a11b500a10f36b 100644 (file)
@@ -74,9 +74,9 @@ class NetworkPackageReaderTask extends BaseTask implements Taskable, Visitable {
         */
        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
@@ -84,9 +84,9 @@ class NetworkPackageReaderTask extends BaseTask implements Taskable, Visitable {
                         * 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
        }
 }
index 12cbd092daa06de4ff2db52fddc8bd6a1d525909..e410f660ba3769c92c443ed2a9cf8579a57cf6ff 100644 (file)
@@ -70,15 +70,15 @@ class NetworkPackageWriterTask extends BaseTask implements Taskable, Visitable {
         */
        public function executeTask () {
                // Do we have something to deliver?
-               if ($this->getPackageInstance()->isPackageEnqueued()) {
-                       // Okay, then deliver (better discover its recipients) this package
-                       $this->getPackageInstance()->declareEnqueuedPackage();
+               if ($this->getPackageInstance()->isPackageWaitingForDelivery()) {
+                       // Sent it finally out
+                       $this->getPackageInstance()->sendWaitingPackage();
                } elseif ($this->getPackageInstance()->isPackageDeclared()) {
                        // Prepare package for delivery
                        $this->getPackageInstance()->deliverDeclaredPackage();
-               } elseif ($this->getPackageInstance()->isPackageWaitingForDelivery()) {
-                       // Sent it finally out
-                       $this->getPackageInstance()->sendWaitingPackage();
+               } elseif ($this->getPackageInstance()->isPackageEnqueued()) {
+                       // Okay, then deliver (better discover its recipients) this package
+                       $this->getPackageInstance()->declareEnqueuedPackage();
                }
        }
 }