]> git.mxchange.org Git - hub.git/blobdiff - application/hub/main/registry/socket/class_SocketRegistry.php
Continued with refacturing:
[hub.git] / application / hub / main / registry / socket / class_SocketRegistry.php
index e20b0f98a04fad37b0a341d76bd9595bdd9f6793..9b55d9cd79ca6e4171a609f40dc760c0625ea07e 100644 (file)
@@ -64,6 +64,9 @@ class SocketRegistry extends BaseRegistry implements Register, RegisterableSocke
         * @return      $key                            A string representation of the socket for the registry
         */
        private function getSubRegistryKey (Listenable $connectionInstance) {
+               // Debug message
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-REGISTRY[' . __METHOD__ . ':' . __LINE__ . ']: connectionInstance=' . $connectionInstance->__toString() . ' - ENTERED!');
+
                // Default address is invalid
                $address = '*invalid*';
                $port    = 0;
@@ -83,6 +86,9 @@ class SocketRegistry extends BaseRegistry implements Register, RegisterableSocke
                        $this->debugBackTrace('Unsupported connectionInstance=' . $connectionInstance->__toString() . ' detected. Please fix this!');
                }
 
+               // Debug message
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-REGISTRY[' . __METHOD__ . ':' . __LINE__ . ']: address=' . $address . ',port=' . $port);
+
                // Get connection type and port number and add both together
                $key = sprintf('%s:%s:%s:%s',
                        $connectionInstance->__toString(),
@@ -91,6 +97,9 @@ class SocketRegistry extends BaseRegistry implements Register, RegisterableSocke
                        $port
                );
 
+               // Debug message
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-REGISTRY[' . __METHOD__ . ':' . __LINE__ . ']: key=' .  $key . ' - EXIT!');
+
                // Return resulting key
                return $key;
        }
@@ -102,9 +111,15 @@ class SocketRegistry extends BaseRegistry implements Register, RegisterableSocke
         * @return      $key                            A string representation of the listener for the registry
         */
        private function getRegistryKeyFromListener (Listenable $listenerInstance) {
+               // Debug message
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-REGISTRY[' . __METHOD__ . ':' . __LINE__ . ']: listenerInstance=' . $listenerInstance->__toString() . ' - ENTERED!');
+
                // Get the key
                $key = $listenerInstance->getConnectionType();
 
+               // Debug message
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('SOCKET-REGISTRY[' . __METHOD__ . ':' . __LINE__ . ']: key=' .  $key . ' - EXIT!');
+
                // Return resulting key
                return $key;
        }