Internal TODO closed, description of NetworkPackage class updated
authorRoland Häder <roland@mxchange.org>
Tue, 12 Apr 2011 00:51:37 +0000 (00:51 +0000)
committerRoland Häder <roland@mxchange.org>
Tue, 12 Apr 2011 00:51:37 +0000 (00:51 +0000)
application/hub/main/package/class_NetworkPackage.php
docs/TODOs.txt

index a9a8a543e1b7d702f9a648b80305a4199fe38ad6..ddc95fe874eb8336a00ac4f3a535b2c74cdc6933 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 /**
- * A NetworkPackage class. This class implements the Deliverable class because
- * all network packages should be deliverable to other nodes. It further
- * provides methods for reading raw content from template engines and feeding it
- * to the stacker for undeclared packages.
+ * A NetworkPackage class. This class implements Deliverable because all network
+ * packages should be deliverable to other nodes. It further provides methods
+ * for reading raw content from template engines and feeding it to the stacker
+ * for undeclared packages.
  *
  * The factory method requires you to provide a compressor class (which must
  * implement the Compressor interface). If you don't want any compression (not
@@ -11,7 +11,7 @@
  * class and encode it with BASE64 for a more error-free transfer over the
  * Internet.
  *
- * For performance reasons, this class should only be instantiated once and then
+ * For performance reasons, this class should only be instanciated once and then
  * used as a "pipe-through" class.
  *
  * @author             Roland Haeder <webmaster@ship-simu.org>
 class NetworkPackage extends BaseFrameworkSystem implements Deliverable, Registerable {
        /**
         * Package mask for compressing package data:
-        * 1.) Compressor extension
-        * 2.) Raw package data
-        * 3.) Tags, seperated by semicolons, no semicolon is required if only one tag is needed
-        * 4.) Checksum
+        * 0: Compressor extension
+        * 1: Raw package data
+        * 2: Tags, seperated by semicolons, no semicolon is required if only one tag is needed
+        * 3: Checksum
+        *                     0  1  2  3
         */
        const PACKAGE_MASK = '%s:%s:%s:%s';
 
@@ -405,13 +406,13 @@ class NetworkPackage extends BaseFrameworkSystem implements Deliverable, Registe
         * @return      void
         */
        public function sendWaitingPackage () {
-               // Sent any waiting bytes in the back-buffer
+               // Send any waiting bytes in the back-buffer before sending a new package
                $this->sendBackBufferBytes();
 
                // Sanity check if we have packages waiting for delivery
                if (!$this->isPackageWaitingForDelivery()) {
                        // This is not fatal but should be avoided
-                       // @TODO Add some logging here
+                       $this->debugOutput('PACKAGE: No package is waiting for delivery, but ' . __FUNCTION__ . ' was called.');
                        return;
                } // END - if
 
index 14eb7f90cbaaeb213fbdc325ee2c5bae94043c2a..2a05e280b54709fa9013edc345a4bc4114fcb407 100644 (file)
@@ -37,7 +37,7 @@
 ./application/hub/main/helper/connection/tcp/class_TcpConnectionHelper.php:139:         * @todo        We may want to implement a filter for ease notification of other objects like our pool
 ./application/hub/main/helper/connection/udp/class_UdpConnectionHelper.php:10: * @todo         Find an interface for hub helper
 ./application/hub/main/helper/hub/announcement/class_HubDescriptorHelper.php:10: * @todo               Find an interface for hub helper
-./application/hub/main/helper/hub/announcement/class_HubDescriptorHelper.php:65:        * @todo        Rewrite the ->renderXmlContent() call to no arguments
+./application/hub/main/helper/hub/announcement/class_HubDescriptorHelper.php:61:        * @todo        Rewrite the ->renderXmlContent() call to no arguments
 ./application/hub/main/helper/hub/connection/class_HubSelfConnectHelper.php:10: * @todo                Find an interface for hub helper
 ./application/hub/main/helper/work_units/cruncher/class_CruncherTestUnitHelper.php:53:  * @todo        0% done
 ./application/hub/main/helper/work_units/cruncher/class_CruncherTestUnitHelper.php:64:  * @todo        0% done
@@ -52,9 +52,9 @@
 ./application/hub/main/nodes/boot/class_HubBootNode.php:119:           // @TODO Add some filters here
 ./application/hub/main/nodes/boot/class_HubBootNode.php:58:     * @todo        add some more special bootstrap things for this boot node
 ./application/hub/main/nodes/boot/class_HubBootNode.php:99:     * @todo        Unfinished method
-./application/hub/main/nodes/class_BaseHubNode.php:428:         * @todo        Try to make this method more generic so we can move it in BaseFrameworkSystem
-./application/hub/main/nodes/class_BaseHubNode.php:468:         * @todo        Change the first if() block to check for a specific state
-./application/hub/main/nodes/class_BaseHubNode.php:643:                // @TODO Add some criteria, e.g. if the node is active or so
+./application/hub/main/nodes/class_BaseHubNode.php:406:         * @todo        Try to make this method more generic so we can move it in BaseFrameworkSystem
+./application/hub/main/nodes/class_BaseHubNode.php:446:         * @todo        Change the first if() block to check for a specific state
+./application/hub/main/nodes/class_BaseHubNode.php:621:                // @TODO Add some criteria, e.g. if the node is active or so
 ./application/hub/main/nodes/list/class_HubListNode.php:58:     * @todo        Implement more bootstrap steps
 ./application/hub/main/nodes/list/class_HubListNode.php:68:     * @todo        Unfinished method
 ./application/hub/main/nodes/list/class_HubListNode.php:91:            // @TODO Add some filters here
 ./application/hub/main/nodes/regular/class_HubRegularNode.php:58:       * @todo        Implement this method
 ./application/hub/main/nodes/regular/class_HubRegularNode.php:68:       * @todo        Unfinished method
 ./application/hub/main/nodes/regular/class_HubRegularNode.php:91:              // @TODO Add some filters here
-./application/hub/main/package/class_NetworkPackage.php:150:           // @TODO crc32 is not good, but it needs to be fast
+./application/hub/main/package/class_NetworkPackage.php:152:           // @TODO crc32 is not good, but it needs to be fast
 ./application/hub/main/package/class_NetworkPackage.php:22: * @todo            Needs to add functionality for handling the object's type
-./application/hub/main/package/class_NetworkPackage.php:259:                   // @TODO We may want to do somthing more here?
-./application/hub/main/package/class_NetworkPackage.php:357:                   // @TODO Add some logging here
-./application/hub/main/package/class_NetworkPackage.php:383:                   // @TODO Add some logging here
-./application/hub/main/package/class_NetworkPackage.php:409:                   // @TODO Add some logging here
+./application/hub/main/package/class_NetworkPackage.php:264:                   // @TODO We may want to do somthing more here?
+./application/hub/main/package/class_NetworkPackage.php:363:                   // @TODO Add some logging here
+./application/hub/main/package/class_NetworkPackage.php:389:                   // @TODO Add some logging here
 ./application/hub/main/pools/peer/class_DefaultPeerPool.php:148:                       // @TODO Check for IP
+./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
-./application/hub/main/producer/cruncher/keys/class_CruncherKeyProducer.php:99:                // @TODO Do something with it
 ./application/hub/main/producer/cruncher/work_units/class_CruncherTestUnitProducer.php:79:      * @todo        ~60% done
 ./application/hub/main/producer/cruncher/work_units/class_CruncherTestUnitProducer.php:99:                     // @TODO Unfinished work here
 ./application/hub/main/resolver/state/network/class_NetworkStateResolver.php:68:        * @todo        ~30% done
 ./inc/loader/class_ClassLoader.php:264:                        /* @todo: Do not die here. */
 ./inc/output.php:11: * @todo           We should minimize these includes
 ./inc/selector.php:11: * @todo         We should minimize these includes
-./index.php:59:         * @todo        This method is old code and needs heavy rewrite
+./index.php:59:         * @todo        This method is old code and needs heavy rewrite and should be moved to ApplicationHelper
 ### ### DEPRECATION FOLLOWS: ### ###
 ./application/hub/interfaces/messages/class_MessageHelper.php:2:// @DEPRECATED
 ./application/hub/main/database/wrapper/class_NodeInformationDatabaseWrapper.php:2:// @DEPRECATED