]> git.mxchange.org Git - hub.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Sat, 20 May 2017 20:28:46 +0000 (22:28 +0200)
committerRoland Häder <roland@mxchange.org>
Fri, 21 Aug 2020 16:50:04 +0000 (18:50 +0200)
- Per definition, filters are classes. So let's add _class into their
  configuration keys to have the later testing suite easily pick them up
  for testing.
- implemented enableSocketNonBlocking()
- imported InvalidServerSocketException
- let's get peerAddress (old: peerName) and peerPort via call-by-reference and
  as all the other socket methods result as returned value
- always initialize variables, before using them ...

Signed-off-by: Roland Häder <roland@mxchange.org>
18 files changed:
application/hub/classes/commands/console/class_HubConsoleAptProxyCommand.php
application/hub/classes/commands/console/class_HubConsoleChatCommand.php
application/hub/classes/commands/console/class_HubConsoleCrawlerCommand.php
application/hub/classes/commands/console/class_HubConsoleCruncherCommand.php
application/hub/classes/commands/console/class_HubConsoleMainCommand.php
application/hub/classes/commands/console/class_HubConsoleMinerCommand.php
application/hub/classes/commands/html/class_HubHtmlIndexCommand.php
application/hub/classes/container/socket/class_SocketContainer.php
application/hub/classes/controller/console/class_HubConsoleDefaultNewsController.php
application/hub/classes/database/frontend/states/class_PeerStateLookupDatabaseWrapper.php
application/hub/classes/factories/chain/class_PackageFilterChainFactory.php
application/hub/classes/listener/class_BaseListener.php
application/hub/classes/nodes/list/class_HubListNode.php
application/hub/classes/nodes/master/class_HubMasterNode.php
application/hub/classes/nodes/regular/class_HubRegularNode.php
application/hub/classes/pools/peer/class_DefaultPeerPool.php
application/hub/config.php
application/hub/interfaces/container/socket/class_StorableSocket.php

index dc3bff6bfe8d6738acfc0a90ed3742f978d52da8..0d4f253d26c007d9cf5ea44b5e671785d497a8b3 100644 (file)
@@ -121,22 +121,22 @@ class HubConsoleAptProxyCommand extends BaseCommand implements Commandable {
         */
        public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) {
                // Add pre filters
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('apt_proxy_php_requirements_filter'));
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('apt_proxy_initializer_filter'));
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('apt_proxy_welcome_teaser_filter'));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('apt_proxy_php_requirements_filter_class'));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('apt_proxy_initializer_filter_class'));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('apt_proxy_welcome_teaser_filter_class'));
 
                // Add bootstrap filters
-               $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('apt_proxy_bootstrap_task_handler_initializer_filter'));
-               $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('apt_proxy_bootstrap_extra_bootstrapping_filter'));
+               $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('apt_proxy_bootstrap_task_handler_initializer_filter_class'));
+               $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('apt_proxy_bootstrap_extra_bootstrapping_filter_class'));
 
                // This is the last generic boostrap filter
-               $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('apt_proxy_bootstrap_generic_activation_filter'));
+               $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('apt_proxy_bootstrap_generic_activation_filter_class'));
 
                // Add shutdown filters
-               //$controllerInstance->addShutdownFilter(ObjectFactory::createObjectByConfiguredName('apt_proxy_shutdown_task_handler_filter'));
+               //$controllerInstance->addShutdownFilter(ObjectFactory::createObjectByConfiguredName('apt_proxy_shutdown_task_handler_filter_class'));
 
                // This is the last generic shutdown filter
-               $controllerInstance->addShutdownFilter(ObjectFactory::createObjectByConfiguredName('apt_proxy_shutdown_filter'));
+               $controllerInstance->addShutdownFilter(ObjectFactory::createObjectByConfiguredName('apt_proxy_shutdown_filter_class'));
        }
 }
 
index 95ceaef8bf785a32e40c0c8741b00a0c3b12015b..7b1ec9134a6e6b2556280fd6997e3001523bbdc3 100644 (file)
@@ -121,22 +121,22 @@ class HubConsoleChatCommand extends BaseCommand implements Commandable {
         */
        public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) {
                // Add pre filters
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('chat_php_requirements_filter'));
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('chat_initializer_filter'));
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('chat_welcome_teaser_filter'));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('chat_php_requirements_filter_class'));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('chat_initializer_filter_class'));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('chat_welcome_teaser_filter_class'));
 
                // Add bootstrap filters
-               $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('chat_bootstrap_task_handler_initializer_filter'));
-               $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('chat_bootstrap_extra_bootstrapping_filter'));
+               $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('chat_bootstrap_task_handler_initializer_filter_class'));
+               $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('chat_bootstrap_extra_bootstrapping_filter_class'));
 
                // This is the last generic boostrap filter
-               $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('chat_bootstrap_generic_activation_filter'));
+               $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('chat_bootstrap_generic_activation_filter_class'));
 
                // Add shutdown filters
-               //$controllerInstance->addShutdownFilter(ObjectFactory::createObjectByConfiguredName('chat_shutdown_task_handler_filter'));
+               //$controllerInstance->addShutdownFilter(ObjectFactory::createObjectByConfiguredName('chat_shutdown_task_handler_filter_class'));
 
                // This is the last generic shutdown filter
-               $controllerInstance->addShutdownFilter(ObjectFactory::createObjectByConfiguredName('chat_shutdown_filter'));
+               $controllerInstance->addShutdownFilter(ObjectFactory::createObjectByConfiguredName('chat_shutdown_filter_class'));
        }
 }
 
index 0562334dc12e6b92baed4b81e2dd9a6f23443f65..f58a1279fff7bf242d68a402e1c60370131bfcd7 100644 (file)
@@ -121,22 +121,22 @@ class HubConsoleCrawlerCommand extends BaseCommand implements Commandable {
         */
        public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) {
                // Add pre filters
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('crawler_php_requirements_filter'));
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('crawler_initializer_filter'));
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('crawler_welcome_teaser_filter'));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('crawler_php_requirements_filter_class'));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('crawler_initializer_filter_class'));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('crawler_welcome_teaser_filter_class'));
 
                // Add bootstrap filters
-               $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('crawler_bootstrap_task_handler_initializer_filter'));
-               $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('crawler_bootstrap_extra_bootstrapping_filter'));
+               $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('crawler_bootstrap_task_handler_initializer_filter_class'));
+               $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('crawler_bootstrap_extra_bootstrapping_filter_class'));
 
                // This is the last generic boostrap filter
-               $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('crawler_bootstrap_generic_activation_filter'));
+               $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('crawler_bootstrap_generic_activation_filter_class'));
 
                // Add shutdown filters
-               //$controllerInstance->addShutdownFilter(ObjectFactory::createObjectByConfiguredName('crawler_shutdown_task_handler_filter'));
+               //$controllerInstance->addShutdownFilter(ObjectFactory::createObjectByConfiguredName('crawler_shutdown_task_handler_filter_class'));
 
                // This is the last generic shutdown filter
-               $controllerInstance->addShutdownFilter(ObjectFactory::createObjectByConfiguredName('crawler_shutdown_filter'));
+               $controllerInstance->addShutdownFilter(ObjectFactory::createObjectByConfiguredName('crawler_shutdown_filter_class'));
        }
 }
 
index a0c8c43157ad8a7029277fb565ace8ee39a5c74d..81f87a17c92d948e1d35369ae3c3c0f0d02e1bbc 100644 (file)
@@ -121,23 +121,23 @@ class HubConsoleCruncherCommand extends BaseCommand implements Commandable {
         */
        public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) {
                // Add pre filters
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('cruncher_php_requirements_filter'));
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('cruncher_initializer_filter'));
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('cruncher_welcome_teaser_filter'));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('cruncher_php_requirements_filter_class'));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('cruncher_initializer_filter_class'));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('cruncher_welcome_teaser_filter_class'));
 
                // Add bootstrap filters
-               $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('cruncher_bootstrap_task_handler_initializer_filter'));
-               $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('cruncher_bootstrap_extra_bootstrapping_filter'));
-               $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('cruncher_bootstrap_buffer_queue_initializer_filter'));
+               $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('cruncher_bootstrap_task_handler_initializer_filter_class'));
+               $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('cruncher_bootstrap_extra_bootstrapping_filter_class'));
+               $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('cruncher_bootstrap_buffer_queue_initializer_filter_class'));
 
                // This is the last generic boostrap filter
-               $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('cruncher_bootstrap_generic_activation_filter'));
+               $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('cruncher_bootstrap_generic_activation_filter_class'));
 
                // Add shutdown filters
-               //$controllerInstance->addShutdownFilter(ObjectFactory::createObjectByConfiguredName('cruncher_shutdown_task_handler_filter'));
+               //$controllerInstance->addShutdownFilter(ObjectFactory::createObjectByConfiguredName('cruncher_shutdown_task_handler_filter_class'));
 
                // This is the last generic shutdown filter
-               $controllerInstance->addShutdownFilter(ObjectFactory::createObjectByConfiguredName('cruncher_shutdown_filter'));
+               $controllerInstance->addShutdownFilter(ObjectFactory::createObjectByConfiguredName('cruncher_shutdown_filter_class'));
        }
 }
 
index 4044f51aa4cf062101c442cda5d8abdbaf426c33..14a4b5660aa37bdbb4855a42f38f1c277752da93 100644 (file)
@@ -131,26 +131,26 @@ class HubConsoleMainCommand extends BaseCommand implements Commandable {
         */
        public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) {
                // Add pre filters
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('node_php_requirements_filter'));
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('node_initializer_filter'));
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('node_welcome_teaser_filter'));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('node_php_requirements_filter_class'));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('node_initializer_filter_class'));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('node_welcome_teaser_filter_class'));
 
                // Add bootstrap filters
-               $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('node_bootstrap_generate_nodeid_filter'));
-               $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('node_bootstrap_generate_sessionid_filter'));
-               $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('node_bootstrap_generate_private_key_filter'));
-               $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('node_bootstrap_extra_bootstrapping_filter'));
-               $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('node_bootstrap_listener_pool_filter'));
+               $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('node_bootstrap_generate_nodeid_filter_class'));
+               $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('node_bootstrap_generate_sessionid_filter_class'));
+               $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('node_bootstrap_generate_private_key_filter_class'));
+               $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('node_bootstrap_extra_bootstrapping_filter_class'));
+               $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('node_bootstrap_listener_pool_filter_class'));
 
                // Add node activation filters
-               $controllerInstance->addActivationFilter(ObjectFactory::createObjectByConfiguredName('node_activation_task_handler_initializer_filter'));
+               $controllerInstance->addActivationFilter(ObjectFactory::createObjectByConfiguredName('node_activation_task_handler_initializer_filter_class'));
 
                // Add shutdown filters
-               $controllerInstance->addShutdownFilter(ObjectFactory::createObjectByConfiguredName('node_shutdown_flush_node_list_filter'));
-               $controllerInstance->addShutdownFilter(ObjectFactory::createObjectByConfiguredName('node_shutdown_task_handler_filter'));
+               $controllerInstance->addShutdownFilter(ObjectFactory::createObjectByConfiguredName('node_shutdown_flush_node_list_filter_class'));
+               $controllerInstance->addShutdownFilter(ObjectFactory::createObjectByConfiguredName('node_shutdown_task_handler_filter_class'));
 
                // This is the last generic shutdown filter
-               $controllerInstance->addShutdownFilter(ObjectFactory::createObjectByConfiguredName('node_shutdown_node_filter'));
+               $controllerInstance->addShutdownFilter(ObjectFactory::createObjectByConfiguredName('node_shutdown_node_filter_class'));
        }
 }
 
index 588f110474f79c56b2c92d79c0a16425fddbe165..c13874bdeb134b2bc4d1df06ac2cc5cc1f73e23e 100644 (file)
@@ -121,23 +121,23 @@ class HubConsoleMinerCommand extends BaseCommand implements Commandable {
         */
        public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) {
                // Add pre filters
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('miner_php_requirements_filter'));
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('miner_initializer_filter'));
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('miner_welcome_teaser_filter'));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('miner_php_requirements_filter_class'));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('miner_initializer_filter_class'));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('miner_welcome_teaser_filter_class'));
 
                // Add bootstrap filters
-               $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('miner_bootstrap_task_handler_initializer_filter'));
-               $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('miner_bootstrap_extra_bootstrapping_filter'));
-               $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('miner_bootstrap_buffer_queue_initializer_filter'));
+               $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('miner_bootstrap_task_handler_initializer_filter_class'));
+               $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('miner_bootstrap_extra_bootstrapping_filter_class'));
+               $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('miner_bootstrap_buffer_queue_initializer_filter_class'));
 
                // This is the last generic boostrap filter
-               $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('miner_bootstrap_generic_activation_filter'));
+               $controllerInstance->addBootstrapFilter(ObjectFactory::createObjectByConfiguredName('miner_bootstrap_generic_activation_filter_class'));
 
                // Add shutdown filters
-               //$controllerInstance->addShutdownFilter(ObjectFactory::createObjectByConfiguredName('miner_shutdown_task_handler_filter'));
+               //$controllerInstance->addShutdownFilter(ObjectFactory::createObjectByConfiguredName('miner_shutdown_task_handler_filter_class'));
 
                // This is the last generic shutdown filter
-               $controllerInstance->addShutdownFilter(ObjectFactory::createObjectByConfiguredName('miner_shutdown_filter'));
+               $controllerInstance->addShutdownFilter(ObjectFactory::createObjectByConfiguredName('miner_shutdown_filter_class'));
        }
 }
 
index 95f04f9013933b20fb1142bcecf310cfd1fbb0e1..ff8d48379d989f16fc2dd26def5f08bb70126cf5 100644 (file)
@@ -95,7 +95,7 @@ class HubHtmlIndexCommand extends BaseCommand implements Commandable {
         */
        public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) {
                // Add pre filters
-               //$controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('node_php_requirements_filter'));
+               //$controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('node_php_requirements_filter_class'));
        }
 }
 
index c62462bec4569a2d03e2cea6ec301c5848077691..a49a2c8094156e3646ccb25ff9aa7bbc2a69178f 100644 (file)
@@ -149,8 +149,12 @@ class SocketContainer extends BaseContainer implements StorableSocket, Visitable
                // Trace message
                /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET: Testing if server socket - CALLED!');
 
+               // Init peer address/port
+               $peerAddress = '0.0.0.0';
+               $peerPort    = '0';
+
                // Check it
-               $isServerSocket = (($this->isValidSocket()) && ($this->getSocketPeerName() === FALSE));
+               $isServerSocket = (($this->isValidSocket()) && ($this->getSocketPeerName($peerAddress, $peerPort) === FALSE));
 
                // Need to clear the error here if it is a resource
                if ($isServerSocket === true) {
@@ -159,8 +163,11 @@ class SocketContainer extends BaseContainer implements StorableSocket, Visitable
                        $this->clearLastSocketError();
                } // END - if
 
+               // Debug message
+               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('SOCKET: peerAddress=%s,peerPort=%d', $peerAddress, $peerPort));
+
                // Check peer name, it must be empty
-               $isServerSocket = (($isServerSocket) && (empty($peerName)));
+               $isServerSocket = (($isServerSocket) && (empty($peerAddress)));
 
                // Trace message
                /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('SOCKET: isServerSocket=%d - EXIT!', intval($isServerSocket)));
@@ -308,6 +315,26 @@ class SocketContainer extends BaseContainer implements StorableSocket, Visitable
                return $result;
        }
 
+       /**
+        * Tries to set non-blocking I/O on stored socket
+        *
+        * @return      $result         Result of changing to non-blocking I/O
+        * @throws      InvalidSocketException  If socket is valid
+        */
+       public function enableSocketNonBlocking () {
+               // Should be valid socket
+               if (!$this->isValidSocket()) {
+                       // Throw exception
+                       throw new InvalidSocketException(array($this, $this->getSocketResource()), BaseListener::EXCEPTION_INVALID_SOCKET);
+               } // END - if
+
+               // Try to set non-blocking I/O
+               $result = socket_set_nonblock($this->getSocketResource());
+
+               // Return result
+               return $result;
+       }
+
        /**
         * Handles socket error for given socket resource and peer data. This method
         * validates socket resource stored in given container if it is a valid
index 2ab7ed7ed4f88d9efe877113cbc8764aad466a14..bf0a624e41ba449253e9241995699e04eaa4e4a1 100644 (file)
@@ -63,8 +63,8 @@ class HubConsoleDefaultNewsController extends BaseController implements Controll
                $controllerInstance->setResolverInstance($resolverInstance);
 
                // Add news filters to this controller
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('news_download_filter'));
-               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('news_process_filter'));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('news_download_filter_class'));
+               $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('news_process_filter_class'));
 
                // Return the prepared instance
                return $controllerInstance;
index 1e0e7784a247699124bab844a72073a59172bab0..43be546201328c8bfa1c8fe3ae3d896cb12b6d36 100644 (file)
@@ -157,8 +157,12 @@ class PeerStateLookupDatabaseWrapper extends BaseDatabaseWrapper implements Look
                // Add session id
                $dataSetInstance->addCriteria(self::DB_COLUMN_PEER_SESSION_ID, $packageData[NetworkPackage::PACKAGE_DATA_SENDER]);
 
+               // Init peer address/port
+               $peerAddress = '0.0.0.0';
+               $peerPort    = '0';
+
                // Get peer name
-               if (!@socket_getpeername($socketResource, $peerName, $peerPort)) {
+               if (!@socket_getpeername($socketResource, $peerAddress, $peerPort)) {
                        // Get last error
                        $lastError = socket_last_error($socketResource);
 
@@ -168,7 +172,7 @@ class PeerStateLookupDatabaseWrapper extends BaseDatabaseWrapper implements Look
                } // END - if
 
                // Add ip address and port
-               $dataSetInstance->addCriteria(self::DB_COLUMN_PEER_IP  , $peerName);
+               $dataSetInstance->addCriteria(self::DB_COLUMN_PEER_IP  , $peerAddress);
                $dataSetInstance->addCriteria(self::DB_COLUMN_PEER_PORT, $peerPort);
 
                // "Insert" the data set
@@ -231,7 +235,7 @@ class PeerStateLookupDatabaseWrapper extends BaseDatabaseWrapper implements Look
         */
        public function purgeOldEntriesBySocketResource ($socketResource) {
                // Get peer name
-               if (!@socket_getpeername($socketResource, $peerName, $peerPort)) {
+               if (!@socket_getpeername($socketResource, $peerAddress, $peerPort)) {
                        // Get last error
                        $lastError = socket_last_error($socketResource);
 
@@ -240,7 +244,7 @@ class PeerStateLookupDatabaseWrapper extends BaseDatabaseWrapper implements Look
                } // END - if
 
                // Debug message
-               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DATABASE-WRAPPER: peerName=' . $peerName . ',peerPort=' . $peerPort . ' - UNFINISHED!');
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DATABASE-WRAPPER: peerAddress=' . $peerAddress . ',peerPort=' . $peerPort . ' - UNFINISHED!');
        }
 
        /**
index 72f7aa7fb1ee38e6ad795e5ab9fe8a94177174b2..989d38b2150af7a7bce659620e9813c8240fe902 100644 (file)
@@ -65,7 +65,7 @@ class PackageFilterChainFactory extends ObjectFactory {
                                 * simply means the tag is not valid. This however should be
                                 * handled some calls before this method is called.
                                 */
-                               $filterInstance = self::createObjectByConfiguredName('package_tag_' . $tag . '_filter');
+                               $filterInstance = self::createObjectByConfiguredName('package_tag_' . $tag . '_filter_class');
 
                                // Add this filter to the chain
                                $chainInstance->addFilter($filterInstance);
index fa72d314e8db0a25253f5aba9d6bbe4c6b6ef2fc..b1039c8d4d32d2f29f4d3e7d72f04e6c3f2345de 100644 (file)
@@ -15,6 +15,7 @@ use Hub\Pool\Peer\PoolablePeer;
 use CoreFramework\Factory\ObjectFactory;
 use CoreFramework\Factory\Registry\Socket\SocketRegistryFactory;
 use CoreFramework\Generic\UnsupportedOperationException;
+use CoreFramework\Socket\InvalidServerSocketException;
 use CoreFramework\Visitor\Visitable;
 use CoreFramework\Visitor\Visitor;
 
@@ -461,8 +462,12 @@ class BaseListener extends BaseHubSystem implements Visitable {
                        // Add it to the peers
                        $this->getPoolInstance()->addPeer($newSocket, BaseConnectionHelper::CONNECTION_TYPE_INCOMING);
 
+                       // Init peer address/port
+                       $peerAddress = '0.0.0.0';
+                       $peerPort    = '0';
+
                        // Get peer name
-                       if (!socket_getpeername($newSocket, $peerName)) {
+                       if (!socket_getpeername($newSocket, $peerAddress)) {
                                // Handle this socket error with a faked recipientData array
                                $this->handleSocketError(__METHOD__, __LINE__, $newSocket, array('0.0.0.0', '0'));
                        } // END - if
@@ -472,7 +477,7 @@ class BaseListener extends BaseHubSystem implements Visitable {
 
                        // Create a faked package data array
                        $packageData = array(
-                               NetworkPackage::PACKAGE_DATA_SENDER    => $peerName . $peerSuffix,
+                               NetworkPackage::PACKAGE_DATA_SENDER    => $peerAddress . $peerSuffix,
                                NetworkPackage::PACKAGE_DATA_RECIPIENT => $nodeInstance->getSessionId(),
                                NetworkPackage::PACKAGE_DATA_STATUS    => NetworkPackage::PACKAGE_STATUS_FAKED
                        );
index a2e943fa7257dfffa9d6dd9519ae0f8237571fee..e7d0587b965069bf039e1adfe2728d15e731bb8f 100644 (file)
@@ -84,7 +84,7 @@ class HubListNode extends BaseHubNode implements NodeHelper, Registerable {
                $controllerInstance = $applicationInstance->getControllerInstance();
 
                // Self-announcement task
-               $controllerInstance->addActivationFilter(ObjectFactory::createObjectByConfiguredName('node_activation_announcement_task_filter'));
+               $controllerInstance->addActivationFilter(ObjectFactory::createObjectByConfiguredName('node_activation_announcement_task_filter_class'));
 
                // @TODO Add some filters here
                $this->partialStub('Add some filters here.');
index e2f8a27900134a3531070def18c65aa90cde4dd1..9909f36b8cdb93819be433c264d6ae7d8ad60acb 100644 (file)
@@ -87,7 +87,7 @@ class HubMasterNode extends BaseHubNode implements NodeHelper, Registerable {
                $controllerInstance = $applicationInstance->getControllerInstance();
 
                // Self-announcement task
-               $controllerInstance->addActivationFilter(ObjectFactory::createObjectByConfiguredName('node_activation_announcement_task_filter'));
+               $controllerInstance->addActivationFilter(ObjectFactory::createObjectByConfiguredName('node_activation_announcement_task_filter_class'));
 
                // @TODO Add some filters here
                $this->partialStub('Add some filters here.');
index 085493ec16912af6c024815884b6e9922e4654f1..1b80ee5c9fc93def6fb6aa1d4b815b5c5f251596 100644 (file)
@@ -84,7 +84,7 @@ class HubRegularNode extends BaseHubNode implements NodeHelper, Registerable {
                $controllerInstance = $applicationInstance->getControllerInstance();
 
                // Self-announcement task
-               $controllerInstance->addActivationFilter(ObjectFactory::createObjectByConfiguredName('node_activation_announcement_task_filter'));
+               $controllerInstance->addActivationFilter(ObjectFactory::createObjectByConfiguredName('node_activation_announcement_task_filter_class'));
 
                // @TODO Add some filters here
                $this->partialStub('Add some filters here.');
index 2e2d3db0eab13656a848342b26e877444a625f28..a6bb89d23bcd1673b354791e8c836d3af506655b 100644 (file)
@@ -112,12 +112,13 @@ class DefaultPeerPool extends BasePool implements PoolablePeer {
                } // END - if
 
                // Default is this peer's IP
-               $peerName = '0.0.0.0';
+               $peerAddress = '0.0.0.0';
+               $peerPort    = '0';
 
                // The socket resource should not match server socket
                if (!$this->getListenerInstance()->getSocketInstance()->equals($socketInstance)) {
                        // Try to determine the peer's IP number
-                       if (!$peerName = $socketInstance->getSocketPeerName()) {
+                       if (!$socketInstance->getSocketPeerName($peerAddress, $peerPort)) {
                                // Handle the socket error with a faked recipientData array
                                $socketInstance->handleSocketError(__METHOD__, __LINE__, array('0.0.0.0', '0'));
                        } // END - if
@@ -127,7 +128,7 @@ class DefaultPeerPool extends BasePool implements PoolablePeer {
                }
 
                // Debug message
-               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('POOL: Adding peer ' . $peerName . ',socketResource=' . $socketInstance->getSocketResource() . ',type=' . $connectionType);
+               self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('POOL: Adding peer ' . $peerAddress . ':' . $peerPort . ',socketResource=' . $socketInstance->getSocketResource() . ',type=' . $connectionType);
 
                // Construct the array
                $socketArray = array(
@@ -254,20 +255,24 @@ class DefaultPeerPool extends BasePool implements PoolablePeer {
                                continue;
                        } // END - if
 
+                       // Init peer address/port
+                       $peerAddress = '0.0.0.0';
+                       $peerPort    = '0';
+
                        // Try to get the "peer"'s name
-                       if (!$peerName = $socketArray[self::SOCKET_ARRAY_INSTANCE]->getSocketPeerName()) {
+                       if (!$socketArray[self::SOCKET_ARRAY_INSTANCE]->getSocketPeerName($peerAddress, $peerPort)) {
                                // Handle the socket error with given package data
                                $socketArray[self::SOCKET_ARRAY_INSTANCE]->handleSocketError(__METHOD__, __LINE__, explode(':', $packageData[NetworkPackage::PACKAGE_DATA_RECIPIENT]));
                        } // END - if
 
                        // Get
                        // If the "peer" IP and recipient is same, use it
-                       if ($peerName == $unlData[UniversalNodeLocator::UNL_PART_ADDRESS]) {
+                       if ($peerAddress == $unlData[UniversalNodeLocator::UNL_PART_ADDRESS]) {
                                // IPs match, so take the socket and quit this loop
                                $socketInstance = $socketArray[self::SOCKET_ARRAY_INSTANCE];
 
                                // Debug message
-                               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('POOL: peerName=' . $peerName . ' matches with recipient IP address. Taking socket=' . $socketArray[self::SOCKET_ARRAY_INSTANCE] . ',type=' . $socketArray[self::SOCKET_ARRAY_CONN_TYPE]);
+                               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('POOL: peerAddress=' . $peerAddress . ' matches with recipient IP address. Taking socket=' . $socketArray[self::SOCKET_ARRAY_INSTANCE] . ',type=' . $socketArray[self::SOCKET_ARRAY_CONN_TYPE]);
                                break;
                        } // END - if
                } // END - foreach
index 4a857330f792aded49885e093e57e9f10d6cb135..b3da984059283eda9451ff1670e29a678d987259 100644 (file)
@@ -160,73 +160,73 @@ $cfg->setConfigEntry('hub_console_cmd_main_resolver_class', 'Hub\Resolver\Comman
 $cfg->setConfigEntry('network_state_resolver_class', 'NetworkStateResolver');
 
 // CFG: NEWS-DOWNLOAD-FILTER
-$cfg->setConfigEntry('news_download_filter', 'CoreFramework\Filter\News\NewsDownloadFilter');
+$cfg->setConfigEntry('news_download_filter_class', 'CoreFramework\Filter\News\NewsDownloadFilter');
 
 // CFG: NEWS-PROCESS-FILTER
-$cfg->setConfigEntry('news_process_filter', 'CoreFramework\Filter\News\NewsProcessFilter');
+$cfg->setConfigEntry('news_process_filter_class', 'CoreFramework\Filter\News\NewsProcessFilter');
 
 // CFG: NODE-PHP-REQUIREMENTS-FILTER
-$cfg->setConfigEntry('node_php_requirements_filter', 'Hub\Filter\Node\Requirements\NodePhpRequirementsFilter');
+$cfg->setConfigEntry('node_php_requirements_filter_class', 'Hub\Filter\Node\Requirements\NodePhpRequirementsFilter');
 
 // CFG: NODE-INITIALIZER-FILTER
-$cfg->setConfigEntry('node_initializer_filter', 'Hub\Filter\Node\Initialization\NodeInitializationFilter');
+$cfg->setConfigEntry('node_initializer_filter_class', 'Hub\Filter\Node\Initialization\NodeInitializationFilter');
 
 // CFG: NODE-ACTIVATION-TASK-HANDLER-INITIALIZER-FILTER
-$cfg->setConfigEntry('node_activation_task_handler_initializer_filter', 'Hub\Filter\Initializer\Node\Handler\Task\NodeTaskHandlerInitializerFilter');
+$cfg->setConfigEntry('node_activation_task_handler_initializer_filter_class', 'Hub\Filter\Initializer\Node\Handler\Task\NodeTaskHandlerInitializerFilter');
 
 // CFG: NODE-ACTIVATION-ANNOUNCEMENT-TASK-FILTER
-$cfg->setConfigEntry('node_activation_announcement_task_filter', 'NodeActivationAnnouncementFilter');
+$cfg->setConfigEntry('node_activation_announcement_task_filter_class', 'NodeActivationAnnouncementFilter');
 
 // CFG: NODE-WELCOME-TEASER-FILTER
-$cfg->setConfigEntry('node_welcome_teaser_filter', 'Hub\Filter\Node\WelcomeTeaser\NodeWelcomeTeaserFilter');
+$cfg->setConfigEntry('node_welcome_teaser_filter_class', 'Hub\Filter\Node\WelcomeTeaser\NodeWelcomeTeaserFilter');
 
 // CFG: NODE-BOOTSTRAP-GENERATE-NODEID-FILTER
-$cfg->setConfigEntry('node_bootstrap_generate_nodeid_filter', 'Hub\Filter\Bootstrap\Node\NodeId\NodeBootstrapGenerateNodeIdFilter');
+$cfg->setConfigEntry('node_bootstrap_generate_nodeid_filter_class', 'Hub\Filter\Bootstrap\Node\NodeId\NodeBootstrapGenerateNodeIdFilter');
 
 // CFG: NODE-BOOTSTRAP-GENERATE-SESSIONID-FILTER
-$cfg->setConfigEntry('node_bootstrap_generate_sessionid_filter', 'Hub\Filter\Bootstrap\Node\SessionId\NodeBootstrapGenerateSessionIdFilter');
+$cfg->setConfigEntry('node_bootstrap_generate_sessionid_filter_class', 'Hub\Filter\Bootstrap\Node\SessionId\NodeBootstrapGenerateSessionIdFilter');
 
 // CFG: NODE-BOOTSTRAP-GENERATE-PRIVATE-KEY-FILTER
-$cfg->setConfigEntry('node_bootstrap_generate_private_key_filter', 'Hub\Filter\Bootstrap\Node\PrivateKey\NodeBootstrapGeneratePrivateKeyFilter');
+$cfg->setConfigEntry('node_bootstrap_generate_private_key_filter_class', 'Hub\Filter\Bootstrap\Node\PrivateKey\NodeBootstrapGeneratePrivateKeyFilter');
 
 // CFG: NODE-BOOTSTRAP-EXTRA-BOOTSTRAPPING-FILTER
-$cfg->setConfigEntry('node_bootstrap_extra_bootstrapping_filter', 'Hub\Filter\Bootstrap\Node\Extra\NodeBootstrapExtraBootstrappingFilter');
+$cfg->setConfigEntry('node_bootstrap_extra_bootstrapping_filter_class', 'Hub\Filter\Bootstrap\Node\Extra\NodeBootstrapExtraBootstrappingFilter');
 
 // CFG: NODE-BOOTSTRAP-LISTENER-POOL-FILTER
-$cfg->setConfigEntry('node_bootstrap_listener_pool_filter', 'Hub\Filter\Bootstrap\Node\Pool\NodeBootstrapListenerPoolFilter');
+$cfg->setConfigEntry('node_bootstrap_listener_pool_filter_class', 'Hub\Filter\Bootstrap\Node\Pool\NodeBootstrapListenerPoolFilter');
 
 // CFG: NODE-SHUTDOWN-FLUSH-NODE-LIST-FILTER
-$cfg->setConfigEntry('node_shutdown_flush_node_list_filter', 'Hub\Filter\Shutdown\Node\NodeList\NodeShutdownFlushNodeListFilter');
+$cfg->setConfigEntry('node_shutdown_flush_node_list_filter_class', 'Hub\Filter\Shutdown\Node\NodeList\NodeShutdownFlushNodeListFilter');
 
 // CFG: NODE-SHUTDOWN-TASK-HANDLER-FILTER
-$cfg->setConfigEntry('node_shutdown_task_handler_filter', 'Hub\Filter\Shutdown\Node\Handler\Task\NodeShutdownTaskHandlerFilter');
+$cfg->setConfigEntry('node_shutdown_task_handler_filter_class', 'Hub\Filter\Shutdown\Node\Handler\Task\NodeShutdownTaskHandlerFilter');
 
 // CFG: NODE-SHUTDOWN-NODE-FILTER
-$cfg->setConfigEntry('node_shutdown_node_filter', 'Hub\Filter\Shutdown\Node\NodeShutdownNodeFilter');
+$cfg->setConfigEntry('node_shutdown_node_filter_class', 'Hub\Filter\Shutdown\Node\NodeShutdownNodeFilter');
 
 // CFG: PACKAGE-FILTER-CHAIN-CLASS
 $cfg->setConfigEntry('package_filter_chain_class', 'PackageFilterChain');
 
 // CFG: PACKAGE-TAG-ANNOUNCEMENT-FILTER
-$cfg->setConfigEntry('package_tag_announcement_filter', 'PackageAnnouncementTagFilter');
+$cfg->setConfigEntry('package_tag_announcement_filter_class', 'PackageAnnouncementTagFilter');
 
 // CFG: PACKAGE-TAG-ANNOUNCEMENT-ANSWER-FILTER
-$cfg->setConfigEntry('package_tag_announcement_answer_filter', 'PackageAnnouncementAnswerTagFilter');
+$cfg->setConfigEntry('package_tag_announcement_answer_filter_class', 'PackageAnnouncementAnswerTagFilter');
 
 // CFG: PACKAGE-TAG-DHT-BOOTSTRAP-ANSWER-FILTER
-$cfg->setConfigEntry('package_tag_dht_bootstrap_answer_filter', 'PackageDhtBootstrapAnswerTagFilter');
+$cfg->setConfigEntry('package_tag_dht_bootstrap_answer_filter_class', 'PackageDhtBootstrapAnswerTagFilter');
 
 // CFG: PACKAGE-TAG-SELF-CONNECT-FILTER
-$cfg->setConfigEntry('package_tag_self_connect_filter', 'PackageSelfConnectTagFilter');
+$cfg->setConfigEntry('package_tag_self_connect_filter_class', 'PackageSelfConnectTagFilter');
 
 // CFG: PACKAGE-TAG-REQUEST-NODE-LIST-FILTER
-$cfg->setConfigEntry('package_tag_request_node_list_filter', 'PackageRequestNodeListTagFilter');
+$cfg->setConfigEntry('package_tag_request_node_list_filter_class', 'PackageRequestNodeListTagFilter');
 
 // CFG: PACKAGE-TAG-REQUEST-NODE-LIST-ANSWER-FILTER
-$cfg->setConfigEntry('package_tag_request_node_list_answer_filter', 'PackageRequestNodeListAnswerTagFilter');
+$cfg->setConfigEntry('package_tag_request_node_list_answer_filter_class', 'PackageRequestNodeListAnswerTagFilter');
 
 // CFG: PACKAGE-TAG-DHT-BOOTSTRAP-FILTER
-$cfg->setConfigEntry('package_tag_dht_bootstrap_filter', 'PackageDhtBootstrapTagFilter');
+$cfg->setConfigEntry('package_tag_dht_bootstrap_filter_class', 'PackageDhtBootstrapTagFilter');
 
 // CFG: MESSAGE-TYPE-ANNOUNCEMENT-HANDLER-CLASS
 $cfg->setConfigEntry('message_type_announcement_handler_class', 'NodeMessageAnnouncementHandler');
@@ -945,28 +945,28 @@ $cfg->setConfigEntry('miner_buffer_stacker_class', 'CoreFramework\Stacker\FiFoSt
 $cfg->setConfigEntry('hub_console_cmd_miner_resolver_class', 'Hub\Resolver\Command\HubConsoleCommandResolver');
 
 // CFG: MINER-PHP-REQUIREMENTS-FILTER
-$cfg->setConfigEntry('miner_php_requirements_filter', 'MinerPhpRequirementsFilter');
+$cfg->setConfigEntry('miner_php_requirements_filter_class', 'MinerPhpRequirementsFilter');
 
 // CFG: MINER-INITIALIZER-FILTER
-$cfg->setConfigEntry('miner_initializer_filter', 'MinerInitializationFilter');
+$cfg->setConfigEntry('miner_initializer_filter_class', 'MinerInitializationFilter');
 
 // CFG: MINER-WELCOME-TEASER-FILTER
-$cfg->setConfigEntry('miner_welcome_teaser_filter', 'MinerWelcomeTeaserFilter');
+$cfg->setConfigEntry('miner_welcome_teaser_filter_class', 'MinerWelcomeTeaserFilter');
 
 // CFG: MINER-BOOTSTRAP-TASK-HANDLER-INITIALIZER-FILTER
-$cfg->setConfigEntry('miner_bootstrap_task_handler_initializer_filter', 'MinerTaskHandlerInitializerFilter');
+$cfg->setConfigEntry('miner_bootstrap_task_handler_initializer_filter_class', 'MinerTaskHandlerInitializerFilter');
 
 // CFG: CRUNCHER-BOOTSTRAP-EXTRA-BOOTSTRAPPING-FILTER
-$cfg->setConfigEntry('miner_bootstrap_extra_bootstrapping_filter', 'MinerBootstrapExtraBootstrappingFilter');
+$cfg->setConfigEntry('miner_bootstrap_extra_bootstrapping_filter_class', 'MinerBootstrapExtraBootstrappingFilter');
 
 // CFG: MINHER-BOOTSTRAP-BUFFER-QUEUE-INITIALIZER-FILTER
-$cfg->setConfigEntry('miner_bootstrap_buffer_queue_initializer_filter', 'MinerBootstrapBufferQueueInitializerFilter');
+$cfg->setConfigEntry('miner_bootstrap_buffer_queue_initializer_filter_class', 'MinerBootstrapBufferQueueInitializerFilter');
 
 // CFG: MINER-BOOTSTRAP-GENERIC-ACTIVATION-FILTER
-$cfg->setConfigEntry('miner_bootstrap_generic_activation_filter', 'MinerBootstrapGenericActivationFilter');
+$cfg->setConfigEntry('miner_bootstrap_generic_activation_filter_class', 'MinerBootstrapGenericActivationFilter');
 
 // CFG: MINER-SHUTDOWN-FILTER
-$cfg->setConfigEntry('miner_shutdown_filter', 'MinerShutdownFilter');
+$cfg->setConfigEntry('miner_shutdown_filter_class', 'MinerShutdownFilter');
 
 // CFG: MINER-INIT-STATE-CLASS
 $cfg->setConfigEntry('miner_init_state_class', 'MinerInitState');
@@ -1051,28 +1051,28 @@ $cfg->setConfigEntry('cruncher_buffer_stacker_class', 'CoreFramework\Stacker\FiF
 $cfg->setConfigEntry('hub_console_cmd_cruncher_resolver_class', 'Hub\Resolver\Command\HubConsoleCommandResolver');
 
 // CFG: CRUNCHER-PHP-REQUIREMENTS-FILTER
-$cfg->setConfigEntry('cruncher_php_requirements_filter', 'CruncherPhpRequirementsFilter');
+$cfg->setConfigEntry('cruncher_php_requirements_filter_class', 'CruncherPhpRequirementsFilter');
 
 // CFG: CRUNCHER-INITIALIZER-FILTER
-$cfg->setConfigEntry('cruncher_initializer_filter', 'CruncherInitializationFilter');
+$cfg->setConfigEntry('cruncher_initializer_filter_class', 'CruncherInitializationFilter');
 
 // CFG: CRUNCHER-BOOTSTRAP-TASK-HANDLER-INITIALIZER-FILTER
-$cfg->setConfigEntry('cruncher_bootstrap_task_handler_initializer_filter', 'CruncherTaskHandlerInitializerFilter');
+$cfg->setConfigEntry('cruncher_bootstrap_task_handler_initializer_filter_class', 'CruncherTaskHandlerInitializerFilter');
 
 // CFG: CRUNCHER-BOOTSTRAP-EXTRA-BOOTSTRAPPING-FILTER
-$cfg->setConfigEntry('cruncher_bootstrap_extra_bootstrapping_filter', 'CruncherBootstrapExtraBootstrappingFilter');
+$cfg->setConfigEntry('cruncher_bootstrap_extra_bootstrapping_filter_class', 'CruncherBootstrapExtraBootstrappingFilter');
 
 // CFG: CRUNCHER-BOOTSTRAP-BUFFER-QUEUE-INITIALIZER-FILTER
-$cfg->setConfigEntry('cruncher_bootstrap_buffer_queue_initializer_filter', 'CruncherBootstrapBufferQueueInitializerFilter');
+$cfg->setConfigEntry('cruncher_bootstrap_buffer_queue_initializer_filter_class', 'CruncherBootstrapBufferQueueInitializerFilter');
 
 // CFG: CRUNCHER-BOOTSTRAP-GENERIC-ACTIVATION-FILTER
-$cfg->setConfigEntry('cruncher_bootstrap_generic_activation_filter', 'CruncherBootstrapGenericActivationFilter');
+$cfg->setConfigEntry('cruncher_bootstrap_generic_activation_filter_class', 'CruncherBootstrapGenericActivationFilter');
 
 // CFG: CRUNCHER-WELCOME-TEASER-FILTER
-$cfg->setConfigEntry('cruncher_welcome_teaser_filter', 'CruncherWelcomeTeaserFilter');
+$cfg->setConfigEntry('cruncher_welcome_teaser_filter_class', 'CruncherWelcomeTeaserFilter');
 
 // CFG: CRUNCHER-SHUTDOWN-FILTER
-$cfg->setConfigEntry('cruncher_shutdown_filter', 'CruncherShutdownFilter');
+$cfg->setConfigEntry('cruncher_shutdown_filter_class', 'CruncherShutdownFilter');
 
 // CFG: CRUNCHER-WORK-UNIT-FETCHER-TASK-CLASS
 $cfg->setConfigEntry('cruncher_work_unit_fetcher_task_class', 'CruncherWorkUnitFetcherTask');
@@ -1190,28 +1190,28 @@ $cfg->setConfigEntry('cruncher_per_unit_key_limit', 1000);
 $cfg->setConfigEntry('hub_console_cmd_chat_resolver_class', 'Hub\Resolver\Command\HubConsoleCommandResolver');
 
 // CFG: CHAT-PHP-REQUIREMENTS-FILTER
-$cfg->setConfigEntry('chat_php_requirements_filter', 'ChatPhpRequirementsFilter');
+$cfg->setConfigEntry('chat_php_requirements_filter_class', 'ChatPhpRequirementsFilter');
 
 // CFG: CHAT-INITIALIZER-FILTER
-$cfg->setConfigEntry('chat_initializer_filter', 'ChatInitializationFilter');
+$cfg->setConfigEntry('chat_initializer_filter_class', 'ChatInitializationFilter');
 
 // CFG: NODE-CONSOLE-CHAT
 $cfg->setConfigEntry('node_console_chat_class', 'NodeConsoleChat');
 
 // CFG: CHAT-WELCOME-TEASER-FILTER
-$cfg->setConfigEntry('chat_welcome_teaser_filter', 'ChatWelcomeTeaserFilter');
+$cfg->setConfigEntry('chat_welcome_teaser_filter_class', 'ChatWelcomeTeaserFilter');
 
 // CFG: CHAT-BOOTSTRAP-TASK-HANDLER-INITIALIZER-FILTER
-$cfg->setConfigEntry('chat_bootstrap_task_handler_initializer_filter', 'ChatTaskHandlerInitializerFilter');
+$cfg->setConfigEntry('chat_bootstrap_task_handler_initializer_filter_class', 'ChatTaskHandlerInitializerFilter');
 
 // CFG: CHAT-BOOTSTRAP-EXTRA-BOOTSTRAPPING-FILTER
-$cfg->setConfigEntry('chat_bootstrap_extra_bootstrapping_filter', 'ChatBootstrapExtraBootstrappingFilter');
+$cfg->setConfigEntry('chat_bootstrap_extra_bootstrapping_filter_class', 'ChatBootstrapExtraBootstrappingFilter');
 
 // CFG: CHAT-BOOTSTRAP-GENERIC-ACTIVATION-FILTER
-$cfg->setConfigEntry('chat_bootstrap_generic_activation_filter', 'ChatBootstrapGenericActivationFilter');
+$cfg->setConfigEntry('chat_bootstrap_generic_activation_filter_class', 'ChatBootstrapGenericActivationFilter');
 
 // CFG: CHAT-SHUTDOWN-FILTER
-$cfg->setConfigEntry('chat_shutdown_filter', 'ChatShutdownFilter');
+$cfg->setConfigEntry('chat_shutdown_filter_class', 'ChatShutdownFilter');
 
 // CFG: CHAT-TELNET-LISTENER-TASK-CLASS
 $cfg->setConfigEntry('chat_telnet_listener_task_class', 'ChatTelnetListenerTask');
@@ -1242,28 +1242,28 @@ $cfg->setConfigEntry('index_extension', '.idx');
 $cfg->setConfigEntry('hub_console_cmd_crawler_resolver_class', 'Hub\Resolver\Command\HubConsoleCommandResolver');
 
 // CFG: CRAWLER-PHP-REQUIREMENTS-FILTER
-$cfg->setConfigEntry('crawler_php_requirements_filter', 'CrawlerPhpRequirementsFilter');
+$cfg->setConfigEntry('crawler_php_requirements_filter_class', 'CrawlerPhpRequirementsFilter');
 
 // CFG: CRAWLER-INITIALIZER-FILTER
-$cfg->setConfigEntry('crawler_initializer_filter', 'CrawlerInitializationFilter');
+$cfg->setConfigEntry('crawler_initializer_filter_class', 'CrawlerInitializationFilter');
 
 // CFG: NODE-CONSOLE-CRAWLER
 $cfg->setConfigEntry('node_console_crawler_class', 'NodeConsoleCrawler');
 
 // CFG: CRAWLER-WELCOME-TEASER-FILTER
-$cfg->setConfigEntry('crawler_welcome_teaser_filter', 'CrawlerWelcomeTeaserFilter');
+$cfg->setConfigEntry('crawler_welcome_teaser_filter_class', 'CrawlerWelcomeTeaserFilter');
 
 // CFG: CRAWLER-BOOTSTRAP-TASK-HANDLER-INITIALIZER-FILTER
-$cfg->setConfigEntry('crawler_bootstrap_task_handler_initializer_filter', 'CrawlerTaskHandlerInitializerFilter');
+$cfg->setConfigEntry('crawler_bootstrap_task_handler_initializer_filter_class', 'CrawlerTaskHandlerInitializerFilter');
 
 // CFG: CRAWLER-BOOTSTRAP-EXTRA-BOOTSTRAPPING-FILTER
-$cfg->setConfigEntry('crawler_bootstrap_extra_bootstrapping_filter', 'CrawlerBootstrapExtraBootstrappingFilter');
+$cfg->setConfigEntry('crawler_bootstrap_extra_bootstrapping_filter_class', 'CrawlerBootstrapExtraBootstrappingFilter');
 
 // CFG: CRAWLER-BOOTSTRAP-GENERIC-ACTIVATION-FILTER
-$cfg->setConfigEntry('crawler_bootstrap_generic_activation_filter', 'CrawlerBootstrapGenericActivationFilter');
+$cfg->setConfigEntry('crawler_bootstrap_generic_activation_filter_class', 'CrawlerBootstrapGenericActivationFilter');
 
 // CFG: CRAWLER-SHUTDOWN-FILTER
-$cfg->setConfigEntry('crawler_shutdown_filter', 'CrawlerShutdownFilter');
+$cfg->setConfigEntry('crawler_shutdown_filter_class', 'CrawlerShutdownFilter');
 
 // CFG: CRAWLER-NODE-COMMUNICATOR-CLASS
 $cfg->setConfigEntry('crawler_node_communicator_class', 'CrawlerNodeCommunicator');
@@ -1510,28 +1510,28 @@ $cfg->setConfigEntry('crawler_url_list_column_separator', ',');
 $cfg->setConfigEntry('hub_console_cmd_apt_proxy_resolver_class', 'Hub\Resolver\Command\HubConsoleCommandResolver');
 
 // CFG: APT-PROXY-PHP-REQUIREMENTS-FILTER
-$cfg->setConfigEntry('apt_proxy_php_requirements_filter', 'AptProxyPhpRequirementsFilter');
+$cfg->setConfigEntry('apt_proxy_php_requirements_filter_class', 'AptProxyPhpRequirementsFilter');
 
 // CFG: APT-PROXY-INITIALIZER-FILTER
-$cfg->setConfigEntry('apt_proxy_initializer_filter', 'AptProxyInitializationFilter');
+$cfg->setConfigEntry('apt_proxy_initializer_filter_class', 'AptProxyInitializationFilter');
 
 // CFG: NODE-CONSOLE-APT-PROXY
 $cfg->setConfigEntry('node_console_apt_proxy_class', 'NodeConsoleAptProxy');
 
 // CFG: APT-PROXY-WELCOME-TEASER-FILTER
-$cfg->setConfigEntry('apt_proxy_welcome_teaser_filter', 'AptProxyWelcomeTeaserFilter');
+$cfg->setConfigEntry('apt_proxy_welcome_teaser_filter_class', 'AptProxyWelcomeTeaserFilter');
 
 // CFG: APT-PROXY-BOOTSTRAP-TASK-HANDLER-INITIALIZER-FILTER
-$cfg->setConfigEntry('apt_proxy_bootstrap_task_handler_initializer_filter', 'AptProxyTaskHandlerInitializerFilter');
+$cfg->setConfigEntry('apt_proxy_bootstrap_task_handler_initializer_filter_class', 'AptProxyTaskHandlerInitializerFilter');
 
 // CFG: APT-PROXY-BOOTSTRAP-EXTRA-BOOTSTRAPPING-FILTER
-$cfg->setConfigEntry('apt_proxy_bootstrap_extra_bootstrapping_filter', 'AptProxyBootstrapExtraBootstrappingFilter');
+$cfg->setConfigEntry('apt_proxy_bootstrap_extra_bootstrapping_filter_class', 'AptProxyBootstrapExtraBootstrappingFilter');
 
 // CFG: APT-PROXY-BOOTSTRAP-GENERIC-ACTIVATION-FILTER
-$cfg->setConfigEntry('apt_proxy_bootstrap_generic_activation_filter', 'AptProxyBootstrapGenericActivationFilter');
+$cfg->setConfigEntry('apt_proxy_bootstrap_generic_activation_filter_class', 'AptProxyBootstrapGenericActivationFilter');
 
 // CFG: APT-PROXY-SHUTDOWN-FILTER
-$cfg->setConfigEntry('apt_proxy_shutdown_filter', 'AptProxyShutdownFilter');
+$cfg->setConfigEntry('apt_proxy_shutdown_filter_class', 'AptProxyShutdownFilter');
 
 // CFG: APT-PROXY-LISTENER-TASK-CLASS
 $cfg->setConfigEntry('apt_proxy_listener_task_class', 'AptProxyListenerTask');
index 49ee4659ec75ce1696d3665fcf46ee0bf7fd0977..3afb47d131912b993055f4c78cb4375c07e69d57 100644 (file)
@@ -100,6 +100,14 @@ interface StorableSocket extends FrameworkInterface {
         */
        function listenOnSocket ();
 
+       /**
+        * Tries to set non-blocking I/O on stored socket
+        *
+        * @return      $result         Result of changing to non-blocking I/O
+        * @throws      InvalidSocketException  If socket is valid
+        */
+       function enableSocketNonBlocking ();
+
        /**
         * Handles socket error for given socket resource and peer data. This method
         * validates socket resource stored in given container if it is a valid