*/
function addAllChunksWithFinal (array $chunks);
+ /**
+ * Checks whether unhandled chunks are available
+ *
+ * @return $unhandledChunks Whether unhandled chunks are left
+ */
+ function ifUnhandledChunksWithFinalAvailable ();
+
/**
* Handles available chunks by processing one-by-one (not all together,
* this would slow-down the whole application) with the help of an
*
* @return void
*/
- function handleAvailableChunks ();
+ function handleAvailableChunksWithFinal ();
}
// [EOF]
*
* @return $unhandledChunks Whether unhandled chunks are left
*/
- public function ifUnhandledChunksAvailable () {
+ public function ifUnhandledChunksWithFinalAvailable () {
// Simply check if the stacker is not empty
$unhandledChunks = $this->getStackerInstance()->isStackEmpty(self::STACKER_NAME_CHUNKS_WITH_FINAL_EOP) === false;
*
* @return void
*/
- public function handleAvailableChunks () {
+ public function handleAvailableChunksWithFinal () {
// First check if there are undhandled chunks available
- assert($this->ifUnhandledChunksAvailable());
+ assert($this->ifUnhandledChunksWithFinalAvailable());
// Get an entry from the stacker
$chunk = $this->getStackerInstance()->popNamed(self::STACKER_NAME_CHUNKS_WITH_FINAL_EOP);
// Don't process this chunk
return;
} // END - if
+
+ /*
+ * It is now known that (as long as the hash algorithm has no
+ * collisions) the content is the same as the sender sends it to this
+ * peer.
+ */
die('chunk=' . $chunk . chr(10));
}
}
*
* @param $rawData Raw data bytes to hash
* @return $hash Hash from the raw data
+ * @todo Implement a way to send non-announcement packages with extra-salt
*/
private function generateHashFromRawData ($rawData) {
/*
*/
public function executeTask () {
// Are there chunks to handle?
- if ($this->getHandlerInstance()->ifUnhandledChunksAvailable()) {
+ if ($this->getHandlerInstance()->ifUnhandledChunksWithFinalAvailable()) {
// Then handle them (not all!)
- $this->getHandlerInstance()->handleAvailableChunks();
+ $this->getHandlerInstance()->handleAvailableChunksWithFinal();
} // END - if
}
}
./application/hub/main/package/class_NetworkPackage.php:225: * @todo $helperInstance is unused
./application/hub/main/package/class_NetworkPackage.php:229: // @TODO crc32() is very weak, but it needs to be fast
./application/hub/main/package/class_NetworkPackage.php:23: * @todo Needs to add functionality for handling the object's type
-./application/hub/main/package/class_NetworkPackage.php:393: // @TODO We may want to do somthing more here?
-./application/hub/main/package/class_NetworkPackage.php:499: // @TODO Add some logging here
-./application/hub/main/package/class_NetworkPackage.php:525: // @TODO Add some logging here
-./application/hub/main/package/class_NetworkPackage.php:629: // @TODO Add some logging here
-./application/hub/main/package/class_NetworkPackage.php:728: // @TODO Add some content here
-./application/hub/main/package/class_NetworkPackage.php:767: * @todo This may be enchanced for outgoing packages?
-./application/hub/main/package/fragmenter/class_PackageFragmenter.php:427: * @todo $helperInstance is unused
+./application/hub/main/package/class_NetworkPackage.php:392: // @TODO We may want to do somthing more here?
+./application/hub/main/package/class_NetworkPackage.php:498: // @TODO Add some logging here
+./application/hub/main/package/class_NetworkPackage.php:524: // @TODO Add some logging here
+./application/hub/main/package/class_NetworkPackage.php:628: // @TODO Add some logging here
+./application/hub/main/package/class_NetworkPackage.php:727: // @TODO Add some content here
+./application/hub/main/package/class_NetworkPackage.php:766: * @todo This may be enchanced for outgoing packages?
+./application/hub/main/package/fragmenter/class_PackageFragmenter.php:274: * @todo Implement a way to send non-announcement packages with extra-salt
+./application/hub/main/package/fragmenter/class_PackageFragmenter.php:431: * @todo $helperInstance is unused
./application/hub/main/producer/cruncher/keys/class_CruncherKeyProducer.php:106: // @TODO Do something with it
./application/hub/main/producer/cruncher/keys/class_CruncherKeyProducer.php:62: * @todo Find something for init phase of this key producer
./application/hub/main/producer/cruncher/keys/class_CruncherKeyProducer.php:72: * @todo ~30% done