From: Roland Häder Date: Tue, 7 Aug 2012 18:41:45 +0000 (+0000) Subject: Added message type to messageData array for easier handling, some comments improved X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=768f3f31c2b077cb52df3e7cef4deb6e3196e8c7;p=hub.git Added message type to messageData array for easier handling, some comments improved --- diff --git a/application/hub/main/database/wrapper/node/class_NodeListDatabaseWrapper.php b/application/hub/main/database/wrapper/node/class_NodeListDatabaseWrapper.php index 9cab290b4..4d0dfe0f9 100644 --- a/application/hub/main/database/wrapper/node/class_NodeListDatabaseWrapper.php +++ b/application/hub/main/database/wrapper/node/class_NodeListDatabaseWrapper.php @@ -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; diff --git a/application/hub/main/package/class_NetworkPackage.php b/application/hub/main/package/class_NetworkPackage.php index d0e072087..5d4f11bd8 100644 --- a/application/hub/main/package/class_NetworkPackage.php +++ b/application/hub/main/package/class_NetworkPackage.php @@ -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); } diff --git a/application/hub/main/package/fragmenter/class_PackageFragmenter.php b/application/hub/main/package/fragmenter/class_PackageFragmenter.php index e390e92a2..cbc5cc0ba 100644 --- a/application/hub/main/package/fragmenter/class_PackageFragmenter.php +++ b/application/hub/main/package/fragmenter/class_PackageFragmenter.php @@ -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;