From: Roland Haeder Date: Wed, 25 Feb 2015 00:22:34 +0000 (+0100) Subject: Commented out some noisy lines. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=91ed98aee013f440bb582bdd50a2eaffa1efb78f;p=hub.git Commented out some noisy lines. Signed-off-by: Roland Haeder --- diff --git a/application/hub/main/discovery/recipient/socket/class_PackageSocketDiscovery.php b/application/hub/main/discovery/recipient/socket/class_PackageSocketDiscovery.php index 007dd384f..6d917e039 100644 --- a/application/hub/main/discovery/recipient/socket/class_PackageSocketDiscovery.php +++ b/application/hub/main/discovery/recipient/socket/class_PackageSocketDiscovery.php @@ -57,7 +57,7 @@ class PackageSocketDiscovery extends BaseRecipientDiscovery implements Discovera */ public function discoverListenerInstance (HandleableProtocol $protocolInstance, array $packageData) { // Debug message - /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-DISCOVERY[' . __METHOD__ . ':' . __LINE__ . ']: protocolInstance=' . $protocolInstance->__toString() . ' - CALLED!'); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-DISCOVERY[' . __METHOD__ . ':' . __LINE__ . ']: protocolInstance=' . $protocolInstance->__toString() . ' - CALLED!'); /* * Get the listener pool instance, we need to lookup the matching @@ -72,7 +72,7 @@ class PackageSocketDiscovery extends BaseRecipientDiscovery implements Discovera $protocolName = $protocolInstance->getProtocolName(); // Debug message - /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-DISCOVERY[' . __METHOD__ . ':' . __LINE__ . ']: protocolName=' . $protocolName . ',poolEntriesInstance=' . $poolInstance->getPoolEntriesInstance()->__toString()); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-DISCOVERY[' . __METHOD__ . ':' . __LINE__ . ']: protocolName=' . $protocolName . ',poolEntriesInstance=' . $poolInstance->getPoolEntriesInstance()->__toString()); /* * Now we need to choose again. It is whether we are speaking with a hub @@ -81,7 +81,7 @@ class PackageSocketDiscovery extends BaseRecipientDiscovery implements Discovera */ foreach ($poolInstance->getPoolEntriesInstance()->getArrayFromList($protocolName) as $listenerInstance) { // Debug output - /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-DISCOVERY[' . __METHOD__ . ':' . __LINE__ . ']: protocolName=' . $protocolName . ',listenerInstance[' . gettype($listenerInstance) . ']=' . $listenerInstance); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-DISCOVERY[' . __METHOD__ . ':' . __LINE__ . ']: protocolName=' . $protocolName . ',listenerInstance[' . gettype($listenerInstance) . ']=' . $listenerInstance); // Make sure the instance is valid assert($listenerInstance instanceof Listenable); @@ -93,10 +93,13 @@ class PackageSocketDiscovery extends BaseRecipientDiscovery implements Discovera break; } // END - if - // Debug output + // Debug message //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-DISCOVERY[' . __METHOD__ . ':' . __LINE__ . ']: Listener is NOT accepting package data.'); } // END - foreach + // Debug message + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-DISCOVERY[' . __METHOD__ . ':' . __LINE__ . ']: listenerInstance=' . $listenerInstance->__toString()); + // Return it return $listenerInstance; } @@ -153,6 +156,7 @@ class PackageSocketDiscovery extends BaseRecipientDiscovery implements Discovera $socketResource = $listenerInstance->getPoolInstance()->getSocketFromPackageData($packageData, $connectionType); // Debug message + // @TODO FIXME: I don't like these abuse of variables, better strict types if (is_resource($socketResource)) { //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('socketResource[' . gettype($socketResource) . ']=' . $socketResource . ',error=' . socket_strerror(socket_last_error($socketResource)) . ',packageData=' . print_r($packageData, TRUE)); } else {