]> git.mxchange.org Git - hub.git/commitdiff
Added message type to messageData array for easier handling, some comments improved
authorRoland Häder <roland@mxchange.org>
Tue, 7 Aug 2012 18:41:45 +0000 (18:41 +0000)
committerRoland Häder <roland@mxchange.org>
Tue, 7 Aug 2012 18:41:45 +0000 (18:41 +0000)
application/hub/main/database/wrapper/node/class_NodeListDatabaseWrapper.php
application/hub/main/package/class_NetworkPackage.php
application/hub/main/package/fragmenter/class_PackageFragmenter.php

index 9cab290b48428afdbb8516f954c10aad13efe6c9..4d0dfe0f9aff6cefb6e7030115472251cd149081 100644 (file)
@@ -85,7 +85,7 @@ class NodeListDatabaseWrapper extends BaseDatabaseWrapper implements NodeListWra
 
                        // Which protocol?
                        switch ($protocol) {
-                               case NetworkPackage::PROTOCOL_TCP: // Transmission Control Procol has been used
+                               case NetworkPackage::PROTOCOL_TCP: // Transmission Control Protocol has been used
                                        $recipientPort = $this->getField('node_' . XmlAnnouncementTemplateEngine::ANNOUNCEMENT_DATA_TCP_PORT);
                                        break;
 
index d0e07208737727ea8c6c8abe8ea66279cc2f7f68..5d4f11bd85d929f57aadcaed0a8a1f897fcb04f4 100644 (file)
@@ -1121,6 +1121,9 @@ class NetworkPackage extends BaseHubSystem implements Deliverable, Receivable, R
                // Create a handler instance from given message type
                $handlerInstance = MessageTypeHandlerFactory::createMessageTypeHandlerInstance($messageArray[self::MESSAGE_ARRAY_TYPE]);
 
+               // Add type for later easier handling
+               $messageArray[self::MESSAGE_ARRAY_DATA][self::MESSAGE_ARRAY_TYPE] = $messageArray[self::MESSAGE_ARRAY_TYPE];
+
                // Handle message data
                $handlerInstance->handleMessageData($messageArray[self::MESSAGE_ARRAY_DATA], $this);
        }
index e390e92a2232e6856368ae5038d282804852e5e7..cbc5cc0ba5072c354482badfacbca33e31ad2cb4 100644 (file)
@@ -62,7 +62,7 @@ class PackageFragmenter extends BaseHubSystem implements Fragmentable, Registera
        private $serialNumber = 0x00000000;
 
        /**
-        * Maximum possible serial number
+        * Maximum possible serial number, "cache" for speeding up things
         */
        private $maxSerialNumber  = 0;