From: Roland Häder Date: Sat, 19 May 2012 13:53:17 +0000 (+0000) Subject: Even more debug lines added, check for SocketContainer added X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=a11590ffc1a1d2e944f6fafd1632a0ae27507df3;p=hub.git Even more debug lines added, check for SocketContainer added --- diff --git a/application/hub/main/pools/peer/class_DefaultPeerPool.php b/application/hub/main/pools/peer/class_DefaultPeerPool.php index f80dfdb8e..67b02b89c 100644 --- a/application/hub/main/pools/peer/class_DefaultPeerPool.php +++ b/application/hub/main/pools/peer/class_DefaultPeerPool.php @@ -116,7 +116,7 @@ class DefaultPeerPool extends BasePool implements PoolablePeer { $this->debugOutput('POOL: Socket resource is server socket (' . $socketResource . '). This is not a bug.'); } - // Output error message + // Debug message $this->debugOutput('POOL: Adding peer ' . $peerName . ',socketResource=' . $socketResource); // Add it finally to the pool diff --git a/application/hub/main/registry/connection/class_ConnectionRegistry.php b/application/hub/main/registry/connection/class_ConnectionRegistry.php index 22aaedf1e..95405b26f 100644 --- a/application/hub/main/registry/connection/class_ConnectionRegistry.php +++ b/application/hub/main/registry/connection/class_ConnectionRegistry.php @@ -220,6 +220,9 @@ class ConnectionRegistry extends BaseRegistry implements Register, RegisterableC foreach ($this->getInstanceRegistry() as $key => $registryInstance) { // This is always a SubRegistry instance foreach ($registryInstance->getInstanceRegistry() as $subKey => $containerInstance) { + // Debug message + /* NOISY-DEBUG: */ $this->debugOutput('CONNECTION-REGISTRY: key=' . $key . ',subKey=' . $subKey . ',containerInstance=' . $containerInstance->__toString()); + // This is a ConnectionContainer instance, so does the recipient match? if ($containerInstance->ifAddressMatches($packageData[NetworkPackage::PACKAGE_DATA_RECIPIENT])) { // Found one, so get the protocol instance and abort any further search diff --git a/application/hub/main/registry/socket/class_SocketRegistry.php b/application/hub/main/registry/socket/class_SocketRegistry.php index f6e402559..921cc04e9 100644 --- a/application/hub/main/registry/socket/class_SocketRegistry.php +++ b/application/hub/main/registry/socket/class_SocketRegistry.php @@ -218,10 +218,16 @@ class SocketRegistry extends BaseRegistry implements Register, RegisterableSocke // Get all keys and check them foreach ($this->getInstanceRegistry() as $key => $registryInstance) { + // Debug message + /* NOISY-DEBUG: */ $this->debugOutput('SOCKET-REGISTRY: key=' . $key . ',registryInstance=' . $registryInstance->__toString()); + // This is always a SubRegistry instance foreach ($registryInstance->getInstanceRegistry() as $subKey => $containerInstance) { - // This is a SocketContainer instance, so does the recipient match? - if ($containerInstance->ifAddressMatches($packageData[NetworkPackage::PACKAGE_DATA_RECIPIENT])) { + // Debug message + /* NOISY-DEBUG: */ $this->debugOutput('SOCKET-REGISTRY: key=' . $key . ',subKey=' . $subKey . ',containerInstance=' . $containerInstance->__toString()); + + // Is this a SocketContainer instance and is the address the same? + if (($containerInstance instanceof SocketContainer) && ($containerInstance->ifAddressMatches($packageData[NetworkPackage::PACKAGE_DATA_RECIPIENT]))) { // Found one, so get the protocol instance and abort any further search $protocolInstance = $containerInstance->getProtocolInstance(); break;