]> git.mxchange.org Git - hub.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Wed, 4 Jul 2018 00:14:21 +0000 (02:14 +0200)
committerRoland Häder <roland@mxchange.org>
Fri, 21 Aug 2020 16:50:12 +0000 (18:50 +0200)
- commented out noisy debug lines
- updated core

Signed-off-by: Roland Häder <roland@mxchange.org>
application/hub/classes/listener/class_BaseListener.php
application/hub/classes/listener/class_BaseListenerDecorator.php
application/hub/classes/registry/socket/class_SocketRegistry.php
application/hub/classes/visitor/pool/monitor/class_RawDataPoolMonitorVisitor.php
core

index 23c282a456bac999e14dc7633e735486c4d71331..b30a17c708283c67fee138b0dacee3d69f73f99c 100644 (file)
@@ -180,7 +180,7 @@ abstract class BaseListener extends BaseHubSystem implements Visitable {
         */
        protected function registerServerSocketInstance (StorableSocket $socketInstance) {
                // Trace message
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-LISTENER: socketInstance=%s - CALLED!', strtoupper($this->getProtocolName()), $socketInstance->__toString()));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-LISTENER: socketInstance=%s - CALLED!', strtoupper($this->getProtocolName()), $socketInstance->__toString()));
 
                // First check if it is valid
                if ($this->isServerSocketRegistered($socketInstance)) {
@@ -204,13 +204,13 @@ abstract class BaseListener extends BaseHubSystem implements Visitable {
                $this->getRegistryInstance()->registerSocketInstance($infoInstance, $socketInstance);
 
                // Debug message
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-LISTENER: Setting socketInstance ... (socketResource=%s)', strtoupper($this->getProtocolName()), $socketInstance->getSocketResource()));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-LISTENER: Setting socketInstance ... (socketResource=%s)', strtoupper($this->getProtocolName()), $socketInstance->getSocketResource()));
 
                // And set it here
                $this->setSocketInstance($socketInstance);
 
                // Trace message
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-LISTENER: EXIT!', strtoupper($this->getProtocolName())));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-LISTENER: EXIT!', strtoupper($this->getProtocolName())));
        }
 
        /**
@@ -222,13 +222,13 @@ abstract class BaseListener extends BaseHubSystem implements Visitable {
         */
        protected function isServerSocketRegistered (StorableSocket $socketInstance) {
                // Trace message
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-LISTENER: socketInstance=%s - CALLED!', strtoupper($this->getProtocolName()), $socketInstance->__toString()));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-LISTENER: socketInstance=%s - CALLED!', strtoupper($this->getProtocolName()), $socketInstance->__toString()));
 
                // Get a connection info instance
                $infoInstance = ConnectionInfoFactory::createConnectionInfoInstance($this->getProtocolName(), StorableSocket::CONNECTION_TYPE_SERVER);
 
                // Debug message
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-LISTENER: infoInstance[]=%s', strtoupper($this->getProtocolName()), gettype($infoInstance)));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-LISTENER: infoInstance[]=%s', strtoupper($this->getProtocolName()), gettype($infoInstance)));
 
                // Is the instance set?
                if (!($infoInstance instanceof ShareableInfo)) {
@@ -240,13 +240,13 @@ abstract class BaseListener extends BaseHubSystem implements Visitable {
                $infoInstance->fillWithListenerInformation($this);
 
                // Debug message
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-LISTENER: Checking socketInstance ... (socketResource=%s)', strtoupper($this->getProtocolName()), $socketInstance->getSocketResource()));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-LISTENER: Checking socketInstance ... (socketResource=%s)', strtoupper($this->getProtocolName()), $socketInstance->getSocketResource()));
 
                // Check it
                $isRegistered = $this->getRegistryInstance()->isSocketRegistered($infoInstance, $socketInstance);
 
                // Trace message
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-LISTENER: isRegistered=%d - EXIT!', strtoupper($this->getProtocolName()), intval($isRegistered)));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-LISTENER: isRegistered=%d - EXIT!', strtoupper($this->getProtocolName()), intval($isRegistered)));
 
                // Return result
                return $isRegistered;
@@ -260,7 +260,7 @@ abstract class BaseListener extends BaseHubSystem implements Visitable {
         */
        public function accept (Visitor $visitorInstance) {
                // Debug message
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(strtoupper($this->getProtocolName()) . '-LISTENER: ' . $visitorInstance->__toString() . ' has visited ' . $this->__toString() . ' - CALLED!');
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(strtoupper($this->getProtocolName()) . '-LISTENER: ' . $visitorInstance->__toString() . ' has visited ' . $this->__toString() . ' - CALLED!');
 
                // Visit this listener
                $visitorInstance->visitListener($this);
@@ -272,7 +272,7 @@ abstract class BaseListener extends BaseHubSystem implements Visitable {
                } // END - if
 
                // Debug message
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(strtoupper($this->getProtocolName()) . '-LISTENER: ' . $visitorInstance->__toString() . ' has visited ' . $this->__toString() . ' - EXIT!');
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(strtoupper($this->getProtocolName()) . '-LISTENER: ' . $visitorInstance->__toString() . ' has visited ' . $this->__toString() . ' - EXIT!');
        }
 
        /**
@@ -346,7 +346,7 @@ abstract class BaseListener extends BaseHubSystem implements Visitable {
         */
        protected function doListenSocketSelect ($peerSuffix) {
                // Trace message
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-LISTENER: peerSuffix=%s - CALLED!', strtoupper($this->getProtocolName()), $peerSuffix));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-LISTENER: peerSuffix=%s - CALLED!', strtoupper($this->getProtocolName()), $peerSuffix));
 
                // Check on all instances
                assert($this->getPoolInstance() instanceof Poolable);
@@ -356,19 +356,19 @@ abstract class BaseListener extends BaseHubSystem implements Visitable {
                $socketInstance = SocketFactory::createNextAcceptedSocketFromPool($this->getPoolInstance(), $this->getSocketInstance());
 
                // Debug message
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-LISTENER: socketInstance[]=%s accepted.', strtoupper($this->getProtocolName()), gettype($socketInstance)));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-LISTENER: socketInstance[]=%s accepted.', strtoupper($this->getProtocolName()), gettype($socketInstance)));
 
                // Is socket instance set?
                if (!($socketInstance instanceof StorableSocket)) {
                        // Trace message
-                       /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-LISTENER: No new connection on listener ... - EXIT!', strtoupper($this->getProtocolName())));
+                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-LISTENER: No new connection on listener ... - EXIT!', strtoupper($this->getProtocolName())));
 
                        // Nothing has changed on the listener
                        return;
                } // END - if
 
                // Debug message
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-LISTENER: socketInstance.socketResource=%s accepted.', strtoupper($this->getProtocolName()), $socketInstance->getSocketResource()));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-LISTENER: socketInstance.socketResource=%s accepted.', strtoupper($this->getProtocolName()), $socketInstance->getSocketResource()));
 
                // Init peer address/port
                $peerAddress = '0.0.0.0';
@@ -387,7 +387,7 @@ abstract class BaseListener extends BaseHubSystem implements Visitable {
                $infoInstance = ConnectionInfoFactory::createConnectionInfoInstance($this->getProtocolName(), StorableSocket::CONNECTION_TYPE_INCOMING);
 
                // Debug message
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-LISTENER: infoInstance[]=%s', strtoupper($this->getProtocolName()), gettype($infoInstance)));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-LISTENER: infoInstance[]=%s', strtoupper($this->getProtocolName()), gettype($infoInstance)));
 
                // Is the instance set?
                if (!($infoInstance instanceof ShareableInfo)) {
@@ -413,13 +413,13 @@ abstract class BaseListener extends BaseHubSystem implements Visitable {
                $this->getRegistryInstance()->registerSocketInstance($infoInstance, $socketInstance, $packageData);
 
                // Trace message
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-LISTENER: Calling this.handlerInstance.processRawDataFromSocketInstance(resource=%s) ...', strtoupper($this->getProtocolName()), $socketInstance->getSocketResource()));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-LISTENER: Calling this.handlerInstance.processRawDataFromSocketInstance(resource=%s) ...', strtoupper($this->getProtocolName()), $socketInstance->getSocketResource()));
 
                // Handle it here, if not main server socket
                $this->getHandlerInstance()->processRawDataFromSocketInstance($socketInstance);
 
                // Trace message
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-LISTENER: EXIT!', strtoupper($this->getProtocolName())));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-LISTENER: EXIT!', strtoupper($this->getProtocolName())));
        }
 
        /**
@@ -430,7 +430,7 @@ abstract class BaseListener extends BaseHubSystem implements Visitable {
         */
        public function ifListenerAcceptsPackageData (array $packageData) {
                // Trace message
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-LISTENER: packageData()=%d - CALLED!', strtoupper($this->getProtocolName()), count($packageData)));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-LISTENER: packageData()=%d - CALLED!', strtoupper($this->getProtocolName()), count($packageData)));
 
                // Check if same socket protocol
                $socketProtocol = $this->getSocketInstance()->getSocketProtocol();
@@ -442,13 +442,13 @@ abstract class BaseListener extends BaseHubSystem implements Visitable {
                $unlProtocol = $unlInstance->getUnlProtocol();
 
                // Debug message
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-LISTENER: unlInstance.unlProtocol=%s,socketProtocol=%s', strtoupper($this->getProtocolName()), $unlProtocol, $socketProtocol));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-LISTENER: unlInstance.unlProtocol=%s,socketProtocol=%s', strtoupper($this->getProtocolName()), $unlProtocol, $socketProtocol));
 
                // Is same protocol?
                $accepts = ($unlProtocol == $socketProtocol);
 
                // Trace message
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-LISTENER: accepts=%d - EXIT!', strtoupper($this->getProtocolName()), $accepts));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('%s-LISTENER: accepts=%d - EXIT!', strtoupper($this->getProtocolName()), $accepts));
 
                // Return the result
                return $accepts;
index 172b2baae7f22a71f794f132707987c85dde464f..a554b9b790c21faaef1c45578a27cc94e94d4d1b 100644 (file)
@@ -98,19 +98,19 @@ abstract class BaseListenerDecorator extends BaseDecorator implements Visitable
         */
        public function accept (Visitor $visitorInstance) {
                // Trace message
-               /* NOSY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('LISTENER-DECORATOR: visitorInstance=%s - CALLED!', $visitorInstance->__toString()));
+               //* NOSY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('LISTENER-DECORATOR: visitorInstance=%s - CALLED!', $visitorInstance->__toString()));
 
                // Visit this decorator
                $visitorInstance->visitDecorator($this);
 
                // Trace message
-               /* NOSY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('LISTENER-DECORATOR: Calling visitorInstance->visitListener(%s) ...', $this->getListenerInstance()->__toString()));
+               //* NOSY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('LISTENER-DECORATOR: Calling visitorInstance->visitListener(%s) ...', $this->getListenerInstance()->__toString()));
 
                // Visit the covered class
                $visitorInstance->visitListener($this->getListenerInstance());
 
                // Trace message
-               /* NOSY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('LISTENER-DECORATOR: EXIT!');
+               //* NOSY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('LISTENER-DECORATOR: EXIT!');
        }
 
        /**
index cc080909ce10a7f6f2118014067bbf3b12327f14..16eacf6baafb7fe64b8374829608926e9c20fd53 100644 (file)
@@ -371,13 +371,13 @@ class SocketRegistry extends BaseRegistry implements Register, RegisterableSocke
         */
        public function isIncomingSocketRegistered () {
                // Trace message
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-REGISTRY: CALLED!');
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-REGISTRY: CALLED!');
 
                // Default is not found
                $isRegistered = FALSE;
 
                // Trace message
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('SOCKET-REGISTRY: isRegistered=%d - EXIT!', intval($isRegistered)));
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('SOCKET-REGISTRY: isRegistered=%d - EXIT!', intval($isRegistered)));
 
                // Return status
                return $isRegistered;
index ffc9f76a792648f3cf1b855ebc4418e91fe6f94c..add78440201d919b733fcf81c91694fe3310fe25 100644 (file)
@@ -72,7 +72,7 @@ class RawDataPoolMonitorVisitor extends BaseVisitor implements PoolVisitor, List
         */
        public function visitPool (Poolable $poolInstance) {
                // A pool doesn't normally have any raw data waiting
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('RAWDATA-MONITOR-VISITOR: poolInstance=' . $poolInstance->__toString() . ' - CALLED!');
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('RAWDATA-MONITOR-VISITOR: poolInstance=' . $poolInstance->__toString() . ' - CALLED!');
        }
 
        /**
@@ -83,7 +83,7 @@ class RawDataPoolMonitorVisitor extends BaseVisitor implements PoolVisitor, List
         */
        public function visitListener (Listenable $listenerInstance) {
                // Trace message
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('RAWDATA-MONITOR-VISITOR: listenerInstance=' . $listenerInstance->__toString() . ' - CALLED!');
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('RAWDATA-MONITOR-VISITOR: listenerInstance=' . $listenerInstance->__toString() . ' - CALLED!');
 
                /*
                 * The TCP/UDP listener have a socket registry instance set. These
@@ -92,7 +92,7 @@ class RawDataPoolMonitorVisitor extends BaseVisitor implements PoolVisitor, List
                $listenerInstance->monitorIncomingRawData();
 
                // Trace message
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('RAWDATA-MONITOR-VISITOR: EXIT!');
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('RAWDATA-MONITOR-VISITOR: EXIT!');
        }
 
        /**
@@ -103,9 +103,9 @@ class RawDataPoolMonitorVisitor extends BaseVisitor implements PoolVisitor, List
         */
        public function visitDecorator (BaseDecorator $decoratorInstance) {
                // Do monitor here
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('RAWDATA-MONITOR-VISITOR: Visiting decoratorInstance=' . $decoratorInstance->__toString() . ' - CALLED!');
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('RAWDATA-MONITOR-VISITOR: Visiting decoratorInstance=' . $decoratorInstance->__toString() . ' - CALLED!');
                $decoratorInstance->monitorIncomingRawData();
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('RAWDATA-MONITOR-VISITOR: EXIT!');
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('RAWDATA-MONITOR-VISITOR: EXIT!');
        }
 
 }
diff --git a/core b/core
index 3509acc2599a67101b078129441c8125f93dfa1e..3191b3ee467d8844ec574321291cfc6ddc34eb69 160000 (submodule)
--- a/core
+++ b/core
@@ -1 +1 @@
-Subproject commit 3509acc2599a67101b078129441c8125f93dfa1e
+Subproject commit 3191b3ee467d8844ec574321291cfc6ddc34eb69