]> git.mxchange.org Git - hub.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Thu, 5 Jul 2018 21:46:14 +0000 (23:46 +0200)
committerRoland Häder <roland@mxchange.org>
Fri, 21 Aug 2020 16:50:12 +0000 (18:50 +0200)
- added missing getter for UNL protocol
- ops, outgoing TCP/UDP/any connections should be set to 'outgoing', not
  'server'
- commented out/in debug lines

Signed-off-by: Roland Häder <roland@mxchange.org>
16 files changed:
application/hub/classes/container/socket/class_SocketContainer.php
application/hub/classes/discovery/recipient/socket/class_PackageSocketDiscovery.php
application/hub/classes/factories/locator/class_UniversalNodeLocatorFactory.php
application/hub/classes/factories/socket/class_SocketFactory.php
application/hub/classes/helper/connection/class_BaseConnectionHelper.php
application/hub/classes/helper/connection/ipv4/class_BaseIpV4ConnectionHelper.php
application/hub/classes/listener/class_BaseListenerDecorator.php
application/hub/classes/listener/socket/decorator/class_SocketFileListenerDecorator.php
application/hub/classes/listener/tcp/class_TcpListener.php
application/hub/classes/listener/tcp/decorators/class_ClientTcpListenerDecorator.php
application/hub/classes/listener/tcp/decorators/class_HubTcpListenerDecorator.php
application/hub/classes/listener/udp/decorators/class_ClientUdpListenerDecorator.php
application/hub/classes/listener/udp/decorators/class_HubUdpListenerDecorator.php
application/hub/classes/locator/class_UniversalNodeLocator.php
application/hub/classes/package/class_NetworkPackage.php
application/hub/interfaces/locator/class_LocateableNode.php

index ada6d8e1489a74b785912d58cdc149aaa7a9f5e1..ec6dcd444d60abe05f371740abc843e08eba0327 100644 (file)
@@ -113,6 +113,9 @@ class SocketContainer extends BaseHubContainer implements StorableSocket, Visita
                // Get a new instance
                $socketInstance = new SocketContainer();
 
+               // Trace message
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('SOCKET: socketResource=%s,socketProtocol=%s,packageData[%s]=%s', $socketResource, $socketProtocol, StorableSocket::SOCKET_ARRAY_INDEX_TYPE, $packageData[StorableSocket::SOCKET_ARRAY_INDEX_TYPE]));
+
                // Set protocol
                $socketInstance->setSocketProtocol($socketProtocol);
 
@@ -973,7 +976,8 @@ class SocketContainer extends BaseHubContainer implements StorableSocket, Visita
         */
        public function writeBufferToSocketByArray (array &$socketBuffer, &$sentBytes) {
                // Trace message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-SOCKET: socketBuffer()=%d,sentBytes=%d - CALLED!', strtoupper($this->getSocketProtocol()), count($socketBuffer), $sentBytes));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-SOCKET: socketBuffer()=%d,sentBytes=%d - CALLED!', strtoupper($this->getSocketProtocol()), count($socketBuffer), $sentBytes));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-SOCKET: socketBuffer=%s', strtoupper($this->getSocketProtocol()), print_r($socketBuffer, TRUE)));
 
                // Should be valid socket
                if (!$this->isValidSocket()) {
@@ -994,18 +998,18 @@ class SocketContainer extends BaseHubContainer implements StorableSocket, Visita
                }
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-SOCKET: Sending out %d bytes,rawBufferSize=%d,diff=%d to socketResource=%s', strtoupper($this->getSocketProtocol()), strlen($socketBuffer[NetworkPackage::RAW_INDEX_ENCODED_DATA]), $socketBuffer[NetworkPackage::RAW_INDEX_BUFFER_SIZE], $socketBuffer[NetworkPackage::RAW_INDEX_DIFF], $this->getSocketResource()));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-SOCKET: Sending out %d bytes,rawBufferSize=%d,diff=%d to socketResource=%s', strtoupper($this->getSocketProtocol()), strlen($socketBuffer[NetworkPackage::RAW_INDEX_ENCODED_DATA]), $socketBuffer[NetworkPackage::RAW_INDEX_BUFFER_SIZE], $socketBuffer[NetworkPackage::RAW_INDEX_DIFF], $this->getSocketResource()));
 
                // Is some data still pending or sent all out?
                if ($socketBuffer[NetworkPackage::RAW_INDEX_DIFF] >= 0) {
                        // Debug message
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-SOCKET: MD5=%s', strtoupper($this->getSocketProtocol()), md5(substr($socketBuffer[NetworkPackage::RAW_INDEX_ENCODED_DATA], 0, ($socketBuffer[NetworkPackage::RAW_INDEX_BUFFER_SIZE] - $socketBuffer[NetworkPackage::RAW_INDEX_DIFF])))));
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-SOCKET: MD5=%s', strtoupper($this->getSocketProtocol()), md5(substr($socketBuffer[NetworkPackage::RAW_INDEX_ENCODED_DATA], 0, ($socketBuffer[NetworkPackage::RAW_INDEX_BUFFER_SIZE] - $socketBuffer[NetworkPackage::RAW_INDEX_DIFF])))));
 
                        // Send all out (encodedData is smaller than or equal buffer size)
                        $sentBytes = socket_write($this->getSocketResource(), $socketBuffer[NetworkPackage::RAW_INDEX_ENCODED_DATA], ($socketBuffer[NetworkPackage::RAW_INDEX_BUFFER_SIZE] - $socketBuffer[NetworkPackage::RAW_INDEX_DIFF]));
                } else {
                        // Debug message
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-SOCKET: MD5=%s', strtoupper($this->getSocketProtocol()), md5(substr($socketBuffer[NetworkPackage::RAW_INDEX_ENCODED_DATA], 0, $socketBuffer[NetworkPackage::RAW_INDEX_BUFFER_SIZE]))));
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-SOCKET: MD5=%s', strtoupper($this->getSocketProtocol()), md5(substr($socketBuffer[NetworkPackage::RAW_INDEX_ENCODED_DATA], 0, $socketBuffer[NetworkPackage::RAW_INDEX_BUFFER_SIZE]))));
 
                        // Send buffer size out
                        $sentBytes = socket_write($this->getSocketResource(), $socketBuffer[NetworkPackage::RAW_INDEX_ENCODED_DATA], $socketBuffer[NetworkPackage::RAW_INDEX_BUFFER_SIZE]);
@@ -1016,18 +1020,18 @@ class SocketContainer extends BaseHubContainer implements StorableSocket, Visita
                $result = ($sentBytes !== FALSE);
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-SOCKET: sentBytes[%s]=%d,result=%d', strtoupper($this->getSocketProtocol()), gettype($sentBytes), $sentBytes, intval($result)));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-SOCKET: sentBytes[%s]=%d,result=%d', strtoupper($this->getSocketProtocol()), gettype($sentBytes), $sentBytes, intval($result)));
 
                // If there was an error, don't continue here
                if ($result === FALSE) {
                        // Trace message
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-SOCKET: socket_write() failed, please evalutate. - EXIT!', strtoupper($this->getSocketProtocol())));
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-SOCKET: socket_write() failed, please evalutate. - EXIT!', strtoupper($this->getSocketProtocol())));
 
                        // Failed delivery!
                        return FALSE;
                } elseif (($sentBytes === 0) && (strlen($socketBuffer[NetworkPackage::RAW_INDEX_ENCODED_DATA]) > 0)) {
                        // Trace message
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-SOCKET: All sent, returning TRUE ... - EXIT!', strtoupper($this->getSocketProtocol())));
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-SOCKET: All sent, returning TRUE ... - EXIT!', strtoupper($this->getSocketProtocol())));
 
                        // Nothing sent means all data has been sent
                        return TRUE;
@@ -1039,7 +1043,7 @@ class SocketContainer extends BaseHubContainer implements StorableSocket, Visita
                        $socketBuffer[NetworkPackage::RAW_INDEX_SENT_BYTES] += $sentBytes;
 
                        // Debug message
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-SOCKET: Sent out %d of %d bytes ...', strtoupper($this->getSocketProtocol()), $sentBytes, strlen($socketBuffer[NetworkPackage::RAW_INDEX_ENCODED_DATA])));
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-SOCKET: Sent out %d of %d bytes ...', strtoupper($this->getSocketProtocol()), $sentBytes, strlen($socketBuffer[NetworkPackage::RAW_INDEX_ENCODED_DATA])));
 
                        // Cut out the last unsent bytes
                        $socketBuffer[NetworkPackage::RAW_INDEX_ENCODED_DATA] = substr($socketBuffer[NetworkPackage::RAW_INDEX_ENCODED_DATA], $sentBytes);
@@ -1049,7 +1053,7 @@ class SocketContainer extends BaseHubContainer implements StorableSocket, Visita
                }
 
                // Trace message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-SOCKET: result=%d - EXIT!', strtoupper($this->getSocketProtocol()), intval($result)));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-SOCKET: result=%d - EXIT!', strtoupper($this->getSocketProtocol()), intval($result)));
 
                // Return result
                return $result;
index 2bcfb5cd94e55b9b535764366af9f5f645cdaaed..121419be76c565fbe2a3906067d55db18c7cc450 100644 (file)
@@ -151,7 +151,8 @@ class PackageSocketDiscovery extends BaseRecipientDiscovery implements Discovera
         */
        public function discoverSocket (array $packageData, $connectionType) {
                // Debug message
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PACKAGE-SOCKET-DISOVERY: connectionType=' . $connectionType . ' - CALLED!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PACKAGE-SOCKET-DISOVERY: packageData()=' . count($packageData) . ',connectionType=' . $connectionType . ' - CALLED!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('PACKAGE-SOCKET-DISOVERY: packageData=' . print_r($packageData, TRUE));
 
                // Make sure all parameters are valid
                if (!isset($packageData[NetworkPackage::PACKAGE_DATA_RECIPIENT])) {
index e58bb56f5761c08a649951db6afba93c7e28d1b5..1508bf7e8e3496cac3e6d98ef34f0cf699cc8837 100644 (file)
@@ -47,7 +47,7 @@ class UniversalNodeLocatorFactory extends ObjectFactory {
         */
        public static final function createUnlInstanceFromString ($unl) {
                // Trace message
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('UNL-FACTORY: unl=%s - CALLED!', $unl));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('UNL-FACTORY: unl=%s - CALLED!', $unl));
 
                // If there is no handler?
                if (GenericRegistry::getRegistry()->instanceExists('unl_' . $unl)) {
@@ -65,7 +65,7 @@ class UniversalNodeLocatorFactory extends ObjectFactory {
                }
 
                // Trace message
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('UNL-FACTORY: unlInstance[]=%s - EXIT!', gettype($unlInstance)));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('UNL-FACTORY: unlInstance[]=%s - EXIT!', gettype($unlInstance)));
 
                // Return the instance
                return $unlInstance;
index d0d4a2f344b180a42d9456f9c502bbe2a64d8061..97ddddaf75fc15fb1e2c9058e0a843d4f12b80a8 100644 (file)
@@ -202,14 +202,17 @@ class SocketFactory extends ObjectFactory {
         * @todo        Rewrite this to also handle IPv6 addresses and sockets
         */
        public static final function createTcpOutgoingSocketFromPackageData (array $packageData) {
+               // Trace message
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-FACTORY: packageData=' . print_r($packageData, TRUE) . ' - CALLED!');
+
                // Create a socket instance
                $socketResource = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-FACTORY: Created socket[' . gettype($socketResource) . ']=' . $socketResource . '.');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-FACTORY: Created socket[' . gettype($socketResource) . ']=' . $socketResource . ' ...');
 
                // Add socket type 'outgoing' to package data
-               $packageData[StorableSocket::SOCKET_ARRAY_INDEX_TYPE] = StorableSocket::CONNECTION_TYPE_SERVER;
+               $packageData[StorableSocket::SOCKET_ARRAY_INDEX_TYPE] = StorableSocket::CONNECTION_TYPE_OUTGOING;
 
                // Construct container class, this won't be reached if an exception is thrown
                $socketInstance = ObjectFactory::createObjectByConfiguredName('socket_container_class', array($socketResource, StorableSocket::SOCKET_PROTOCOL_TCP, $packageData));
@@ -231,7 +234,7 @@ class SocketFactory extends ObjectFactory {
                } // END - if
 
                // Set the option to reuse the port
-               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-FACTORY: Enabling re-use address ...');
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-FACTORY: Enabling re-use address ...');
                if (!$socketInstance->enableSocketReuseAddress()) {
                        // Handle this socket error with a faked recipientData array
                        $socketInstance->handleSocketError(__METHOD__, __LINE__, array('0.0.0.0', '0'));
@@ -242,7 +245,7 @@ class SocketFactory extends ObjectFactory {
                 * it. This is now the default behaviour for all connection helpers who
                 * call initConnection(); .
                 */
-               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-FACTORY: Setting non-blocking mode.');
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-FACTORY: Setting non-blocking mode.');
                if (!$socketInstance->enableSocketNonBlocking()) {
                        // Handle this socket error with a faked recipientData array
                        $socketInstance->handleSocketError(__METHOD__, __LINE__, array('0.0.0.0', '0'));
index 461624eef0d58894dcb0c58815abc220f4fc42c6..2a75e381958401bdc9aac46880ef7b6172554c4e 100644 (file)
@@ -189,7 +189,7 @@ abstract class BaseConnectionHelper extends BaseHubSystemHelper implements Visit
                $rawDataChunk = $this->getFragmenterInstance()->getNextRawDataChunk($this->currentFinalHash);
 
                // Debug message
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: rawDataChunk=' . print_r($rawDataChunk, TRUE));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: rawDataChunk=' . print_r($rawDataChunk, TRUE));
 
                // Get chunk hashes and chunk data
                $chunkHashes = array_keys($rawDataChunk);
@@ -199,19 +199,19 @@ abstract class BaseConnectionHelper extends BaseHubSystemHelper implements Visit
                $rawData = '';
 
                // Is the required data there?
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: chunkHashes[]=' . count($chunkHashes) . ',chunkData[]=' . count($chunkData));
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('chunkData='.print_r($chunkData, TRUE));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: chunkHashes[]=' . count($chunkHashes) . ',chunkData[]=' . count($chunkData));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('chunkData='.print_r($chunkData, TRUE));
                if ((isset($chunkHashes[0])) && (isset($chunkData[0]))) {
                        // Remember this chunk as queued
                        $this->queuedChunks[$chunkHashes[0]] = $chunkData[0];
 
                        // Return the raw data
-                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: rawData()=' . strlen($chunkData[0]) . ' bytes.');
+                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: rawData()=' . strlen($chunkData[0]) . ' bytes.');
                        $rawData = $chunkData[0];
                } // END - if
 
                // Trace message
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('CONNECTION-HELPER: rawData()=%d - EXIT!', strlen($rawData)));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('CONNECTION-HELPER: rawData()=%d - EXIT!', strlen($rawData)));
 
                // Return raw data
                return $rawData;
@@ -242,7 +242,7 @@ abstract class BaseConnectionHelper extends BaseHubSystemHelper implements Visit
         */
        public function sendRawPackageData (array $packageData) {
                // Trace message
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('CONNECTION-HELPER: packageData()=%d - CALLED!', count($packageData)));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('CONNECTION-HELPER: packageData()=%d - CALLED!', count($packageData)));
 
                // The helper's state must be 'connected'
                $this->getStateInstance()->validatePeerStateConnected();
@@ -251,12 +251,12 @@ abstract class BaseConnectionHelper extends BaseHubSystemHelper implements Visit
                $finalHash = $this->getFragmenterInstance()->fragmentPackageArray($packageData, $this);
 
                // Trace message
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('CONNECTION-HELPER: finalHash[%s]=%s', gettype($finalHash), $finalHash));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('CONNECTION-HELPER: finalHash[%s]=%s', gettype($finalHash), $finalHash));
 
                // Is the final hash set?
                if ($finalHash !== TRUE) {
                        // Debug message
-                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: Setting finalHash=' . $finalHash . ',currentFinalHash[' . gettype($this->currentFinalHash) . ']=' . $this->currentFinalHash);
+                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: Setting finalHash=' . $finalHash . ',currentFinalHash[' . gettype($this->currentFinalHash) . ']=' . $this->currentFinalHash);
 
                        // Set final hash
                        $this->currentFinalHash = $finalHash;
@@ -272,32 +272,32 @@ abstract class BaseConnectionHelper extends BaseHubSystemHelper implements Visit
                // Fill sending buffer with data
                while (TRUE) {
                        // Debug message
-                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('CONNECTION-HELPER: dataStream()=%d - BEFORE!', strlen($dataStream)));
+                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('CONNECTION-HELPER: dataStream()=%d - BEFORE!', strlen($dataStream)));
 
                        // Convert the package data array to a raw data stream
                        $dataStream = $this->getRawDataFromPackageArray($packageData);
 
                        // Debug message
-                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('CONNECTION-HELPER: dataStream()=%d - AFTER!', strlen($dataStream)));
+                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('CONNECTION-HELPER: dataStream()=%d - AFTER!', strlen($dataStream)));
 
                        // Is it empty?
                        if (strlen($dataStream) == 0) {
                                // Debug message
-                               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: dataStream is now empty, exiting loop ...');
+                               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: dataStream is now empty, exiting loop ...');
 
                                // Abort here
                                break;
                        } // END - if
 
                        // Debug message
-                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: Adding ' . strlen($dataStream) . ' bytes to the sending buffer ...');
+                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: Adding ' . strlen($dataStream) . ' bytes to the sending buffer ...');
 
                        // Add raw data
                        $rawData .= $dataStream;
                } // END - while
 
                // Debug message
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('CONNECTION-HELPER: rawData()=%d - after loop ...', strlen($rawData)));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('CONNECTION-HELPER: rawData()=%d - after loop ...', strlen($rawData)));
 
                // Nothing to sent is bad news, so assert on it
                assert(strlen($rawData) > 0);
@@ -306,13 +306,13 @@ abstract class BaseConnectionHelper extends BaseHubSystemHelper implements Visit
                $bufferSize = $this->getConfigInstance()->getConfigEntry($this->getProtocolName() . '_buffer_length');
 
                // Debug message
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('CONNECTION-HELPER: bufferSize=%d', $bufferSize));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('CONNECTION-HELPER: bufferSize=%d', $bufferSize));
 
                // Encode the raw data with our output-stream
                $encodedData = $this->getOutputStreamInstance()->streamData($rawData);
 
                // Debug message
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('CONNECTION-HELPER: socketResource[%s]=%s', gettype($this->getSocketInstance()->getSocketResource()), $this->getSocketInstance()->getSocketResource()));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('CONNECTION-HELPER: socketResource[%s]=%s', gettype($this->getSocketInstance()->getSocketResource()), $this->getSocketInstance()->getSocketResource()));
 
                // Init array
                $encodedDataArray = array(
@@ -328,7 +328,7 @@ abstract class BaseConnectionHelper extends BaseHubSystemHelper implements Visit
                $this->getPackageInstance()->getStackInstance()->pushNamed(NetworkPackage::STACKER_NAME_OUTGOING_STREAM, $encodedDataArray);
 
                // Trace message
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: EXIT!');
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: EXIT!');
        }
 
        /**
index 479654a666800397cd787063b94fd001e004b39b..296b19a7267e71d91c94687a6e4a306d155a3a1a 100644 (file)
@@ -72,14 +72,14 @@ abstract class BaseIpV4ConnectionHelper extends BaseConnectionHelper {
                        $socketError = $this->getSocketInstance()->getLastSocketErrorCode();
 
                        // Log error code and status
-                       /* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: socketError=' . $socketError . ',isConnected=' . intval($isConnected));
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: socketError=' . $socketError . ',isConnected=' . intval($isConnected));
 
                        // Skip any errors which may happen on non-blocking connections
                        if (($socketError == SOCKET_EINPROGRESS) || ($socketError == SOCKET_EALREADY)) {
                                // Now, is that attempt within parameters?
                                if ((time() - $time) >= $timeout) {
                                        // Debug message
-                                       /* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: timeout=' . $timeout .' reached, connection attempt failed.');
+                                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: timeout=' . $timeout .' reached, connection attempt failed.');
 
                                        // Didn't work within timeout
                                        $isConnected = FALSE;
@@ -91,7 +91,7 @@ abstract class BaseIpV4ConnectionHelper extends BaseConnectionHelper {
                                $this->idle(1000);
                        } elseif ($socketError != 0) {
                                // Debug message
-                               /* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: socketError=' . $socketError . ' detected.');
+                               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: socketError=' . $socketError . ' detected.');
 
                                // Stop on everything else pronto
                                $isConnected = FALSE;
@@ -100,7 +100,7 @@ abstract class BaseIpV4ConnectionHelper extends BaseConnectionHelper {
                } // END - while
 
                // Log error code
-               /* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: socketError=' . $socketError . ',isConnected=' . intval($isConnected) . ',hasTimedOut=' . intval($hasTimedOut) . ' after while() loop.');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: socketError=' . $socketError . ',isConnected=' . intval($isConnected) . ',hasTimedOut=' . intval($hasTimedOut) . ' after while() loop.');
 
                /*
                 * All IPv4-based connections are non-blocking used by this program or
@@ -110,7 +110,7 @@ abstract class BaseIpV4ConnectionHelper extends BaseConnectionHelper {
                 */
                if (($hasTimedOut === FALSE) && ($socketError == SOCKET_EINPROGRESS)) {
                        // Debug message
-                       /* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: Clearing "operation in progress" as this is for 99.999% chance a non-blocking I/O operation.');
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: Clearing "operation in progress" as this is for 99.999% chance a non-blocking I/O operation.');
 
                        // A "connection in progress" has not timed out. All fine.
                        $isConnected = TRUE;
@@ -119,6 +119,9 @@ abstract class BaseIpV4ConnectionHelper extends BaseConnectionHelper {
                        $this->getSocketInstance()->clearLastSocketError();
                } // END - if
 
+               // Log error code
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: socketError=' . $socketError . ',isConnected=' . intval($isConnected) . ',hasTimedOut=' . intval($hasTimedOut) . ' after while() loop.');
+
                // Is the peer connected?
                if ($isConnected === TRUE) {
                        // Connection is fully established here, so change the state.
@@ -131,6 +134,9 @@ abstract class BaseIpV4ConnectionHelper extends BaseConnectionHelper {
                        PeerStateFactory::createPeerStateInstanceByName('problem', $this);
                }
 
+               // Log error code
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: isConnected=' . intval($isConnected) . ' - EXIT!');
+
                // Return status
                return $isConnected;
        }
index a554b9b790c21faaef1c45578a27cc94e94d4d1b..7731124a8981bf70fe18986babd11d6bd5d2ab36 100644 (file)
@@ -68,6 +68,26 @@ abstract class BaseListenerDecorator extends BaseDecorator implements Visitable
                parent::__construct($className);
        }
 
+       /**
+        * Setter for protocol name
+        *
+        * @param       $protocolName   Name of used protocol
+        * @return      void
+        */
+       protected final function setProtocolName ($protocolName) {
+               $this->protocolName = $protocolName;
+       }
+
+       /**
+        * Setter for UNL instance
+        *
+        * @param       $unlInstance    An instance of a LocateableNode class
+        * @return      void
+        */
+       protected final function setUniversalNodeLocatorInstance (LocateableNode $unlInstance) {
+               throw new UnsupportedOperationException('This method should not be called.');
+       }
+
        /**
         * Getter for listen address
         *
@@ -310,27 +330,6 @@ abstract class BaseListenerDecorator extends BaseDecorator implements Visitable
                return $this->protocolName;
        }
 
-       /**
-        * Setter for protocol name
-        *
-        * @param       $protocolName   Name of used protocol
-        * @return      void
-        */
-       protected final function setProtocolName ($protocolName) {
-               $this->protocolName = $protocolName;
-       }
-
-       /**
-        * Setter for UNL instance
-        *
-        * @para        $unlInstance    An instance of a LocateableNode class
-        * @return      void
-        * @throws      UnsupportedOperationException   If this method is called
-        */
-       protected final function setUniversalNodeLocatorInstance (LocateableNode $unlInstance) {
-               throw new UnsupportedOperationException('This method should not be called.');
-       }
-
        /**
         * Getter for UNL instance
         *
index 7a8472b596ddcfabb5f9dbe576b5eacb4df083a0..1cde53c38adbedc32a5b678c4982a36e5d2ad6e7 100644 (file)
@@ -80,7 +80,7 @@ class SocketFileListenerDecorator extends BaseListenerDecorator implements Liste
         */
        public function doListen () {
                // Trace message
-               /* NOSY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-FILE-LISTENER: Calling this->getListenerInstance() ...');
+               /* NOSY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-FILE-LISTENER: Calling this->getListenerInstance()->doListen() ...');
 
                // Handle generic TCP package
                $this->getListenerInstance()->doListen();
@@ -96,6 +96,9 @@ class SocketFileListenerDecorator extends BaseListenerDecorator implements Liste
         * @return      $accepts                Whether this listener does accept
         */
        public function ifListenerAcceptsPackageData (array $packageData) {
+               // Debug message
+               /* NOSY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-FILE-LISTENER: Calling this->getListenerInstance()->ifListenerAcceptsPackageData() ...');
+
                // Call inner method, no decoration is wanted in this method
                return $this->getListenerInstance()->ifListenerAcceptsPackageData($packageData);
        }
index b8cf929c963baf2835635e6ab1dba33bc6f9654e..617f95f2e000f5c9e669b5153215e802537a4209 100644 (file)
@@ -115,16 +115,4 @@ class TcpListener extends BaseListener implements Listenable {
                //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TCP-LISTENER: EXIT!');
        }
 
-       /**
-        * Checks whether the listener would accept the given package data array
-        *
-        * @param       $packageData    Raw package data
-        * @return      $accepts                Whether this listener does accept
-        * @throws      UnsupportedOperationException   If this method is called
-        */
-       public function ifListenerAcceptsPackageData (array $packageData) {
-               // Please don't call this
-               throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION);
-       }
-
 }
index d65a4daa610b0260964375886d24899d9124591a..b2b69ef6ca1a4905ae36c22499ba9c5b177456a2 100644 (file)
@@ -99,8 +99,8 @@ class ClientTcpListenerDecorator extends BaseListenerDecorator implements Listen
                // Trace message
                /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('CLIENT-TCP-LISTENER: packageData()=%d - CALLED!', count($packageData)));
 
-               // Call parent method
-               if (!parent::ifListenerAcceptsPackageData($packageData)) {
+               // Invoke decorated listener's method
+               if (!$this->getListenerInstance()->ifListenerAcceptsPackageData($packageData)) {
                        // Trace message
                        /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-FILE-LISTENER: Protocol mismatching, not accepting package.');
 
@@ -109,7 +109,7 @@ class ClientTcpListenerDecorator extends BaseListenerDecorator implements Listen
                } // END - if
 
                // Debugging
-               /* DEBUG-DIE: */ die(__METHOD__.':packageData='.print_r($packageData, TRUE));
+               /* DEBUG-DIE: */ die(__METHOD__ . ':packageData=' . print_r($packageData, TRUE));
 
                // Get a tags instance
                $tagsInstance = PackageTagsFactory::createPackageTagsInstance();
index bcabb5fa1b1109a01f7c24dfba1211e48b37dd59..73b4edc1e0b64677b3bad2e1b38feda9dd865d78 100644 (file)
@@ -99,8 +99,8 @@ class HubTcpListenerDecorator extends BaseListenerDecorator implements Listenabl
                // Trace message
                /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('HUB-TCP-LISTENER: packageData()=%d - CALLED!', count($packageData)));
 
-               // Call parent method
-               if (!parent::ifListenerAcceptsPackageData($packageData)) {
+               // // Invoke decorated listener's method
+               if (!$this->getListenerInstance()->ifListenerAcceptsPackageData($packageData)) {
                        // Trace message
                        /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-FILE-LISTENER: Protocol mismatching, not accepting package.');
 
@@ -109,7 +109,7 @@ class HubTcpListenerDecorator extends BaseListenerDecorator implements Listenabl
                } // END - if
 
                // Debugging
-               /* DEBUG-DIE: */ die(__METHOD__.':packageData='.print_r($packageData, TRUE));
+               //* DEBUG-DIE: */ die(__METHOD__ . ':packageData=' . print_r($packageData, TRUE));
 
                // Get a tags instance
                $tagsInstance = PackageTagsFactory::createPackageTagsInstance();
index 1de47c55a5a9b379347c1045caef6ed066e27368..847a300a90811b4df754f49d4a748c4cc6a4623f 100644 (file)
@@ -99,8 +99,8 @@ class ClientUdpListenerDecorator extends BaseListenerDecorator implements Listen
                // Trace message
                /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('CLIENT-UDP-LISTENER: packageData()=%d - CALLED!', count($packageData)));
 
-               // Call parent method
-               if (!parent::ifListenerAcceptsPackageData($packageData)) {
+               // Invoke decorated listener's method
+               if (!$this->getListenerInstance()->ifListenerAcceptsPackageData($packageData)) {
                        // Trace message
                        /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-FILE-LISTENER: Protocol mismatching, not accepting package.');
 
@@ -109,7 +109,7 @@ class ClientUdpListenerDecorator extends BaseListenerDecorator implements Listen
                } // END - if
 
                // Debugging
-               /* DEBUG-DIE: */ die(__METHOD__.':packageData='.print_r($packageData, TRUE));
+               /* DEBUG-DIE: */ die(__METHOD__ . ':packageData=' . print_r($packageData, TRUE));
 
                // Get a tags instance
                $tagsInstance = PackageTagsFactory::createPackageTagsInstance();
index 76d2984500c5445886d5b0a60842777910321ac6..3253560364e508646842c01217c82e30fbc02875 100644 (file)
@@ -99,8 +99,8 @@ class HubUdpListenerDecorator extends BaseListenerDecorator implements Listenabl
                // Trace message
                /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('HUB-UDP-LISTENER: packageData()=%d - CALLED!', count($packageData)));
 
-               // Call parent method
-               if (!parent::ifListenerAcceptsPackageData($packageData)) {
+               // Invoke decorated listener's method
+               if ($this->getListenerInstance()->ifListenerAcceptsPackageData($packageData)) {
                        // Trace message
                        /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-FILE-LISTENER: Protocol mismatching, not accepting package.');
 
@@ -109,7 +109,7 @@ class HubUdpListenerDecorator extends BaseListenerDecorator implements Listenabl
                } // END - if
 
                // Debugging
-               /* DEBUG-DIE: */ die(__METHOD__.':packageData='.print_r($packageData, TRUE));
+               /* DEBUG-DIE: */ die(__METHOD__ . ':packageData=' . print_r($packageData, TRUE));
 
                // Get a tags instance
                $tagsInstance = PackageTagsFactory::createPackageTagsInstance();
index 23630f4fe39e2581d720ab3b44d220f586f4f349..7a283e572a8d93b336924f2d613aabc7dfffb016 100644 (file)
@@ -117,6 +117,28 @@ class UniversalNodeLocator extends BaseHubSystem implements LocateableNode, Regi
                return $unlData[NodeInformationDatabaseWrapper::DB_COLUMN_INTERNAL_UNL];
        }
 
+       /**
+        * Some "getter" for UNL protocol part.
+        *
+        * @return      $unlAddress UNL protocol part
+        */
+       public function getUnlProtocol () {
+               // Get UNL data
+               $unlData = $this->getUnlData();
+
+               // Default value is NULL
+               $unkProtocol = NULL;
+
+               // Is the element there?
+               if (isset($unlData[LocateableNode::UNL_PART_PROTOCOL])) {
+                       // Use it
+                       $unkProtocol = $unlData[LocateableNode::UNL_PART_PROTOCOL];
+               } // END - if
+
+               // Return it
+               return $unkProtocol;
+       }
+
        /**
         * Some "getter" for UNL address part.
         *
@@ -127,16 +149,16 @@ class UniversalNodeLocator extends BaseHubSystem implements LocateableNode, Regi
                $unlData = $this->getUnlData();
 
                // Default value is NULL
-               $unlPort = NULL;
+               $unkAddress = NULL;
 
                // Is the element there?
                if (isset($unlData[LocateableNode::UNL_PART_ADDRESS])) {
                        // Use it
-                       $unlPort = $unlData[LocateableNode::UNL_PART_ADDRESS];
+                       $unkAddress = $unlData[LocateableNode::UNL_PART_ADDRESS];
                } // END - if
 
                // Return it
-               return $unlPort;
+               return $unkAddress;
        }
 
        /**
@@ -271,6 +293,9 @@ class UniversalNodeLocator extends BaseHubSystem implements LocateableNode, Regi
 
                                // Is the key found?
                                if (isset($unlData[$key])) {
+                                       // Debug message
+                                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('UNIVERSAL-NODE-LOCATOR: Copying unlData[' . $key . ']=' . $unlData[$key] . ' ...');
+
                                        // The copy the entry
                                        $this->unlData[$key] = $unlData[$key];
                                } // END - if
index c4ac7d04b960bd543baf168cc53e53af0209b786..26063f589064c22e5b29e2db401cd0b01e0bbd0e 100644 (file)
@@ -1048,7 +1048,7 @@ class NetworkPackage extends BaseHubSystem implements Deliverable, Receivable, R
         */
        public function sendEncodedData () {
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: CALLED!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: CALLED!');
 
                // Make sure there is pending encoded data
                assert($this->isEncodedDataPending());
@@ -1064,37 +1064,44 @@ class NetworkPackage extends BaseHubSystem implements Deliverable, Receivable, R
                assert($encodedDataArray[self::RAW_INDEX_SOCKET_INSTANCE] instanceof StorableSocket);
                assert($encodedDataArray[self::RAW_INDEX_SOCKET_INSTANCE]->isValidSocket());
 
+               // Get socket instance and remove it from array
+               $socketInstance = $encodedDataArray[self::RAW_INDEX_SOCKET_INSTANCE];
+               $encodedDataArray[self::RAW_INDEX_SOCKET_INSTANCE] = NULL;
+
                // Trace message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('NETWORK-PACKAGE: Calling socketInstance->writeBufferToSocketByArray(%d,%d) ...', count($encodedDataArray), $sentBytes));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('NETWORK-PACKAGE: Calling socketInstance->writeBufferToSocketByArray(%d,%d) ...', count($encodedDataArray), $sentBytes));
 
                // And deliver it
-               if (!$encodedDataArray[self::RAW_INDEX_SOCKET_INSTANCE]->writeBufferToSocketByArray($encodedDataArray, $sentBytes)) {
+               if (!$socketInstance->writeBufferToSocketByArray($encodedDataArray, $sentBytes)) {
                        // Something bad happened while writing to socket
-                       $encodedDataArray[self::RAW_INDEX_SOCKET_INSTANCE]->handleSocketError(__METHOD__, __LINE__, array('0.0.0.0', '0'));
+                       $socketInstance->handleSocketError(__METHOD__, __LINE__, array('0.0.0.0', '0'));
                } // END - if
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('NETWORK-PACKAGE: sentBytes[%s]=%d', gettype($sentBytes), $sentBytes));
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('NETWORK-PACKAGE: sentBytes[%s]=%d', gettype($sentBytes), $sentBytes));
 
                // If there was an error, don't continue here
                if (($sentBytes === 0) && (strlen($encodedDataArray[self::RAW_INDEX_ENCODED_DATA]) > 0)) {
                        // Nothing sent means all data has been sent
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: All sent! (LINE=' . __LINE__ . ')');
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: All sent! (LINE=' . __LINE__ . ')');
                        return;
                } elseif (strlen($encodedDataArray[self::RAW_INDEX_ENCODED_DATA]) == 0) {
                        // Abort here, all sent!
-                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: All sent! (LINE=' . __LINE__ . ')');
+                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: All sent! (LINE=' . __LINE__ . ')');
                        return;
                }
 
+               // Set it back
+               $encodedDataArray[self::RAW_INDEX_SOCKET_INSTANCE] = $socketInstance;
+
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: Pushing raw data back to stacker, as still some data is pending delivery.');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER: Pushing raw data back to stacker, as still some data is pending delivery.');
 
                // Push array back in stack
                $this->getStackInstance()->pushNamed(self::STACKER_NAME_OUTGOING_STREAM, $encodedDataArray);
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: EXIT!');
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE: EXIT!');
        }
 
        ///////////////////////////////////////////////////////////////////////////
index e65907fbbb22657c94d57f816d6aca4f94fb0c94..b29ee82f4658efce5783888fe763b4ab34ca486f 100644 (file)
@@ -59,6 +59,13 @@ interface LocateableNode extends HubInterface {
         */
        function getInternalUnl ();
 
+       /**
+        * Some "getter" for UNL protocol
+        *
+        * @return      $unlProtocol Protocol part of UNL
+        */
+       function getUnlProtocol ();
+
        /**
         * Some "getter" for UNL address.
         *