From: Roland Häder Date: Fri, 19 May 2017 21:17:58 +0000 (+0200) Subject: WIP: More rewrites: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=e1b464a35d1b10345f21a17050137cafa8ba0dea;p=hub.git WIP: More rewrites: - re-added StorableSocket, ConnectionInfoFactory - imported ConnectionInfoFactory - rewrote from low-level socket resource to StorableSocket-way (OOP-ed) - updated core framework - updated TODOs.txt Signed-off-by: Roland Häder --- diff --git a/application/hub/classes/class_BaseHubSystem.php b/application/hub/classes/class_BaseHubSystem.php index 4450c1dbb..09f927df2 100644 --- a/application/hub/classes/class_BaseHubSystem.php +++ b/application/hub/classes/class_BaseHubSystem.php @@ -3,6 +3,7 @@ namespace Hub\Generic; // Import application-specific stuff +use Hub\Container\Socket\StorableSocket; use Hub\Handler\RawData\BaseRawDataHandler; use Hub\Information\ShareableInfo; use Hub\Listener\BaseListener; @@ -13,6 +14,10 @@ use Hub\Pool\Poolable; // Import framework stuff use CoreFramework\Listener\Listenable; use CoreFramework\Object\BaseFrameworkSystem; +use CoreFramework\Socket\InvalidSocketException; + +// Import SPL stuff +use \BadMethodCallException; /** * A general hub system class @@ -126,24 +131,24 @@ class BaseHubSystem extends BaseFrameworkSystem { /** * Handles socket error for given socket resource and peer data. This method - * validates $socketResource if it is a valid resource (see is_resource()) - * but assumes valid data in array $recipientData, except that - * count($recipientData) is always 2. + * validates socket resource stored in given container if it is a valid + * resource (see is_resource()) but assumes valid data in array + * $recipientData, except that count($recipientData) is always 2. * * @param $method Value of __METHOD__ from calling method * @param $line Value of __LINE__ from calling method - * @param $socketResource A valid socket resource + * @param $socketInstance An instance of a StoreableSocket class * @param $socketData A valid socket data array (0 = IP/file name, 1 = port) * @return void - * @throws InvalidSocketException If $socketResource is no socket resource - * @throws NoSocketErrorDetectedException If socket_last_error() gives zero back + * @throws InvalidSocketException If the stored socket resource is no socket resource + * @throws BadMethodCallException If socket_last_error() gives zero back * @todo Move all this socket-related stuff into own class, most of it resides in BaseListener */ - protected final function handleSocketError ($method, $line, $socketResource, array $socketData) { + protected final function handleSocketError ($method, $line, StorableSocket $socketInstance, array $socketData) { // This method handles only socket resources - if (!is_resource($socketResource)) { + if (!$socketInstance->isValidSocket()) { // No resource, abort here - throw new InvalidSocketException(array($this, $socketResource), BaseListener::EXCEPTION_INVALID_SOCKET); + throw new InvalidSocketException(array($this, $socketInstance->getSocketResource()), BaseListener::EXCEPTION_INVALID_SOCKET); } // END - if // Check socket array, 1st element is mostly IP address (or file name), 2nd is port number @@ -152,22 +157,22 @@ class BaseHubSystem extends BaseFrameworkSystem { assert(isset($socketData[1])); // Get error code for first validation (0 is not an error) - $errorCode = socket_last_error($socketResource); + $errorCode = $socketInstance->getSocketLastError(); // If the error code is zero, someone called this method without an error if ($errorCode == 0) { // No error detected (or previously cleared outside this method) - throw new NoSocketErrorDetectedException(array($this, $socketResource), BaseListener::EXCEPTION_NO_SOCKET_ERROR); + throw new BadMethodCallException(array($this, $socketInstance->getSocketResource()), BaseListener::EXCEPTION_NO_SOCKET_ERROR); } // END - if // Get handler (method) name $handlerName = $this->getSocketErrorHandlerFromCode($errorCode); // Call-back the error handler method - call_user_func_array(array($this, $handlerName), array($socketResource, $socketData)); + call_user_func_array(array($this, $handlerName), array($socketInstance, $socketData)); // Finally clear the error because it has been handled - socket_clear_error($socketResource); + $socketInstance->clearLastSocketError(); } /** diff --git a/application/hub/classes/container/socket/class_SocketContainer.php b/application/hub/classes/container/socket/class_SocketContainer.php index f304700c6..0b0165d09 100644 --- a/application/hub/classes/container/socket/class_SocketContainer.php +++ b/application/hub/classes/container/socket/class_SocketContainer.php @@ -10,6 +10,8 @@ use Hub\Network\Package\NetworkPackage; use CoreFramework\Container\BaseContainer; use CoreFramework\Listener\Listenable; use CoreFramework\Registry\Registerable; +use CoreFramework\Visitor\Visitable; +use CoreFramework\Visitor\Visitor; /** * A Socket Container class @@ -33,7 +35,7 @@ use CoreFramework\Registry\Registerable; * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -class SocketContainer extends BaseContainer implements Registerable { +class SocketContainer extends BaseContainer implements StorableSocket, Visitable, Registerable { /** * Protected constructor * @@ -104,7 +106,7 @@ class SocketContainer extends BaseContainer implements Registerable { * @param $unl A Universal Node Locator * @return $matches Whether $address matches with the one from package data */ - public final function ifAddressMatches ($unl) { + public function ifAddressMatches ($unl) { // Get current package data $packageData = $this->getPackageData(); @@ -124,7 +126,7 @@ class SocketContainer extends BaseContainer implements Registerable { * @param $socketResource A valid socket resource * @return $matches Whether given socket matches */ - public final function ifSocketResourceMatches ($socketResource) { + public function ifSocketResourceMatches ($socketResource) { // Debug message /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-CONTAINER[' . __METHOD__ . ':' . __LINE__ . ']: socketResource[' . gettype($socketResource) . ']=' .$socketResource . ',storedResource[' . gettype($this->getSocketResource()) . ']=' . $this->getSocketResource()); @@ -135,4 +137,84 @@ class SocketContainer extends BaseContainer implements Registerable { return $matches; } + /** + * Checks whether the stored socket resource is a server socket + * + * @return $isServerSocket Whether the stored socket resource is a server socket + */ + public function isServerSocketResource () { + // Check it + $isServerSocket = (($this->isValidSocket()) && ($this->getSocketPeerName() === FALSE)); + + // Need to clear the error here if it is a resource + if ($isServerSocket === true) { + // Clear the error + //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('socketResource[]=' . gettype($this->getSocketResource(0)); + $this->clearLastSocketError(); + } // END - if + + // Check peer name, it must be empty + $isServerSocket = (($isServerSocket) && (empty($peerName))); + + // Return result + return $isServerSocket; + } + + /** + * Shuts down a given socket resource. This method does only ease calling + * the right visitor. + * + * @return void + */ + public function shutdownSocket () { + // Debug message + self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET: Shutting down socket resource ' . $this->getSocketResource() . ' with state ' . $this->getPrintableState() . ' ...'); + + // Get a visitor instance + $visitorInstance = ObjectFactory::createObjectByConfiguredName('shutdown_socket_visitor_class'); + + // Debug output + self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET:' . $this->__toString() . ': visitorInstance=' . $visitorInstance->__toString()); + + // Call the visitor + $this->accept($visitorInstance); + } + + /** + * Half-shuts down a given socket resource. This method does only ease calling + * an other visitor than shutdownSocket() does. + * + * @return void + */ + public function halfShutdownSocket () { + // Debug message + self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET: Half-shutting down socket resource ' . $this->getSocketResource() . ' with state ' . $this->getPrintableState() . ' ...'); + + // Get a visitor instance + $visitorInstance = ObjectFactory::createObjectByConfiguredName('half_shutdown_socket_visitor_class'); + + // Debug output + self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET:' . $this->__toString() . ': visitorInstance=' . $visitorInstance->__toString()); + + // Call the visitor + $this->accept($visitorInstance); + } + + /** + * Accepts the visitor to process the visit "request" + * + * @param $visitorInstance An instance of a Visitor class + * @return void + */ + public function accept (Visitor $visitorInstance) { + // Debug message + //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(strtoupper($this->getProtocolName()) . '-SOCKET[' . __METHOD__ . ':' . __LINE__ . ']: ' . $visitorInstance->__toString() . ' has visited ' . $this->__toString() . ' - CALLED!'); + + // Visit this listener + $visitorInstance->visitListener($this); + + // Debug message + //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(strtoupper($this->getProtocolName()) . '-SOCKET[' . __METHOD__ . ':' . __LINE__ . ']: ' . $visitorInstance->__toString() . ' has visited ' . $this->__toString() . ' - EXIT!'); + } + } diff --git a/application/hub/classes/database/frontend/states/class_PeerStateLookupDatabaseWrapper.php b/application/hub/classes/database/frontend/states/class_PeerStateLookupDatabaseWrapper.php index c2cadb773..68bfbd3ba 100644 --- a/application/hub/classes/database/frontend/states/class_PeerStateLookupDatabaseWrapper.php +++ b/application/hub/classes/database/frontend/states/class_PeerStateLookupDatabaseWrapper.php @@ -227,7 +227,7 @@ class PeerStateLookupDatabaseWrapper extends BaseDatabaseWrapper implements Look * @param $socketResource A valid socket resource * @return void * @throws InvalidSocketException If the socket resource was invalid - * @todo Unfinished area + * @todo Unfinished area, please rewrite! */ public function purgeOldEntriesBySocketResource ($socketResource) { // Get peer name diff --git a/application/hub/classes/discovery/recipient/socket/class_PackageSocketDiscovery.php b/application/hub/classes/discovery/recipient/socket/class_PackageSocketDiscovery.php index 9dedb5c7d..3977293a0 100644 --- a/application/hub/classes/discovery/recipient/socket/class_PackageSocketDiscovery.php +++ b/application/hub/classes/discovery/recipient/socket/class_PackageSocketDiscovery.php @@ -3,7 +3,9 @@ namespace Hub\Network\Discovery\Socket; // Import hub-specific stuff +use Hub\Container\Socket\StorableSocket; use Hub\Factory\Node\NodeObjectFactory; +use Hub\Factory\Socket\SocketFactory; use Hub\Generic\BaseHubSystem; use Hub\Helper\Connection\BaseConnectionHelper; use Hub\Network\Package\NetworkPackage; @@ -12,6 +14,7 @@ use Hub\Network\Package\NetworkPackage; use CoreFramework\Listener\Listenable; use CoreFramework\Registry\Registerable; use CoreFramework\Registry\Registry; +use CoreFramework\Socket\InvalidSocketException; /** * A socket discovery class @@ -167,25 +170,17 @@ class PackageSocketDiscovery extends BaseRecipientDiscovery implements Discovera * instance and pass over the whole package data to get the right * socket. */ - $socketResource = $listenerInstance->getPoolInstance()->getSocketFromPackageData($packageData, $connectionType); - - // Debug message - // @TODO FIXME: I don't like these abuse of variables, better strict types - if (is_resource($socketResource)) { - //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('socketResource[' . gettype($socketResource) . ']=' . $socketResource . ',error=' . socket_strerror(socket_last_error($socketResource)) . ',packageData=' . print_r($packageData, TRUE)); - } else { - //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('socketResource[' . gettype($socketResource) . ']=' . $socketResource . ',packageData=' . print_r($packageData, TRUE)); - } + $socketInstance = $listenerInstance->getPoolInstance()->getSocketFromPackageData($packageData, $connectionType); // Is it FALSE, the recipient isn't known to us and we have no connection to it - if (($socketResource === FALSE) || (!is_resource($socketResource)) || (socket_last_error($socketResource) > 0)) { + if (($socketInstance instanceof StorableSocket) || (!$socketInstance->isValidSocket()) || ($socketInstance->getSocketLastError() > 0)) { // Try to create a new socket resource try { // Possibly noisy debug message //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-DISCOVERY[' . __METHOD__ . ':' . __LINE__ . ']: Trying to establish a ' . strtoupper($protocolInstance) . ' connection to ' . $packageData[NetworkPackage::PACKAGE_DATA_RECIPIENT] . ' ...'); // Get a socket resource from our factory (if succeeded) - $socketResource = SocketFactory::createSocketFromPackageData($packageData, $protocolInstance); + $socketInstance = SocketFactory::createSocketFromPackageData($packageData, $protocolInstance); } catch (SocketConnectionException $e) { // The connection fails of being established, so log it away self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-DISCOVERY[' . __METHOD__ . ':' . __LINE__ . ']: Caught ' . $e->__toString() . ',message=' . $e->getMessage()); @@ -201,20 +196,18 @@ class PackageSocketDiscovery extends BaseRecipientDiscovery implements Discovera //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-DISCOVERY[' . __METHOD__ . ':' . __LINE__ . ']: Going to resolve socket from peer state and given package data ...'); // Resolve the peer's state (but ignore return value) - PeerStateResolver::resolveStateByPackage($helperInstance, $packageData, $socketResource); + PeerStateResolver::resolveStateByPackage($helperInstance, $packageData, $socketInstance); } catch (InvalidSocketException $e) { // This cannot be fixed, so log it away self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-DISCOVERY[' . __METHOD__ . ':' . __LINE__ . ']: Cannot discover socket resource for recipient ' . $packageData[NetworkPackage::PACKAGE_DATA_RECIPIENT] . ': ' . $e->getMessage()); // Make any failed attempts to 'FALSE' - $socketResource = FALSE; + $socketInstance = NULL; } // And return it - //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-DISCOVERY[' . __METHOD__ . ':' . __LINE__ . ']: socketResource=' . $socketResource . ',packageData=' . print_r($packageData, TRUE)); - return $socketResource; + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-DISCOVERY[' . __METHOD__ . ':' . __LINE__ . ']: socketResource=' . $socketInstance->getSocketResource() . ',packageData=' . print_r($packageData, TRUE)); + return $socketInstance; } -} -// [EOF] -?> +} diff --git a/application/hub/classes/factories/info/.htaccess b/application/hub/classes/factories/info/.htaccess new file mode 100644 index 000000000..3a4288278 --- /dev/null +++ b/application/hub/classes/factories/info/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/application/hub/classes/factories/info/class_ConnectionInfoFactory.php b/application/hub/classes/factories/info/class_ConnectionInfoFactory.php new file mode 100644 index 000000000..5f4f1e9e7 --- /dev/null +++ b/application/hub/classes/factories/info/class_ConnectionInfoFactory.php @@ -0,0 +1,71 @@ + + * @version 0.0.0 + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2017 Hub Developer Team + * @license GNU GPL 3.0 or any newer version + * @link http://www.ship-simu.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +class ConnectionInfoFactory extends ObjectFactory { + /** + * Protected constructor + * + * @return void + */ + protected function __construct () { + // Call parent constructor + parent::__construct(__CLASS__); + } + + /** + * Returns a singleton (registry-based) ShareableInfo instance + * + * @param $protocolName Name of protocol (e.g. 'tcp') + * @param $type Connection type ('listener' or 'helper') + * @return $infoInstance An instance of a ShareableInfo class + */ + public static final function createConnectionInfoInstance ($protocolName, $type) { + // Generate key + $key = 'connection_info_' . $protocolName . '_' . $type; + + // If there is no info? + if (Registry::getRegistry()->instanceExists($key)) { + // Get info from registry + $infoInstance = Registry::getRegistry()->getInstance($key); + } else { + // Get the info instance + $infoInstance = self::createObjectByConfiguredName('connection_info_class'); + + // Add it to the registry + Registry::getRegistry()->addInstance($key, $infoInstance); + } + + // Return the instance + return $infoInstance; + } +} + +// [EOF] +?> diff --git a/application/hub/classes/factories/socket/class_SocketFactory.php b/application/hub/classes/factories/socket/class_SocketFactory.php index 2a8510f13..6b7c86b57 100644 --- a/application/hub/classes/factories/socket/class_SocketFactory.php +++ b/application/hub/classes/factories/socket/class_SocketFactory.php @@ -8,7 +8,9 @@ use Hub\Network\Package\NetworkPackage; // Import framework stuff use CoreFramework\Configuration\FrameworkConfiguration; use CoreFramework\Factory\ObjectFactory; +use CoreFramework\Listener\Listenable; use CoreFramework\Registry\Registry; +use CoreFramework\Socket\InvalidSocketException; /** * A socket factory class @@ -49,9 +51,12 @@ class SocketFactory extends ObjectFactory { * * @param $packageData Raw package data * @param $protocolInstance An instance of a HandleableProtocol class - * @return $socketResource Socket resource + * @return $socketInstance An instance of a StorableSocket class */ public static function createSocketFromPackageData (array $packageData, HandleableProtocol $protocolInstance) { + // Init instance + $socketInstance = NULL; + // Get an instance $factoryInstance = new SocketFactory(); @@ -64,13 +69,10 @@ class SocketFactory extends ObjectFactory { // Is the key there? if (Registry::getRegistry()->instanceExists($registryKey)) { // Get container instance - $containerInstance = Registry::getRegistry()->getInstance($registryKey); - - // Get socket back - $socketResource = $containerInstance->getSocketResource(); + $socketInstance = Registry::getRegistry()->getInstance($registryKey); // Debug message - //*NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-FACTORY[' . __METHOD__ . ':' . __LINE__ . ']: Using socket ' . $socketResource . '(' . gettype($socketResource) . ') from registry.'); + //*NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-FACTORY[' . __METHOD__ . ':' . __LINE__ . ']: Using socket ' . $socketInstance->getSocketResource() . '(' . gettype($socketInstance->getSocketResource()) . ') from registry.'); } else { // Construct configuration entry for object factory and get it $className = FrameworkConfiguration::getSelfInstance()->getConfigEntry($protocolInstance->getProtocolName() . '_connection_helper_class'); @@ -85,19 +87,100 @@ class SocketFactory extends ObjectFactory { //*NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-FACTORY[' . __METHOD__ . ':' . __LINE__ . ']: Created socket ' . $socketResource . '(' . gettype($socketResource) . ') from class ' . $className . '.'); // Construct container class, this won't be reached if an exception is thrown - $containerInstance = self::CreateObjectByConfiguredName('socket_container_class', array($socketResource, NULL, $packageData)); + $socketInstance = self::createObjectByConfiguredName('socket_container_class', array($socketResource, NULL, $packageData)); // Register it with the registry - Registry::getRegistry()->addInstance($registryKey, $containerInstance); + Registry::getRegistry()->addInstance($registryKey, $socketInstance); // Debug message //*NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-FACTORY[' . __METHOD__ . ':' . __LINE__ . ']: Socket is now registered in registry.'); } - // Return the resource - return $socketResource; + // Return the socket (container) instance + return $socketInstance; } -} -// [EOF] -?> + /** + * Creates a Uni*-socket container instance from given listener + * + * @param $listenerInstance An instance of a Listenable class + * @return $socketInstance An instance of a StorableSocket class + * @throws InvalidSocketException If the socket cannot be completed + */ + public static final function createFileSocket (Listenable $listenerInstance) { + // Create file name + $socketFile = self::createTempPathForFile($listenerInstance->getConfigInstance()->getConfigEntry('ipc_socket_file_name')); + + // Debug message + self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-FILE-LISTENER[' . __METHOD__ . ':' . __LINE__ . ']: socketFile=' . $socketFile . ' ...'); + + // File name must not be empty + assert(!empty($socketFile)); + + // Init package data + $packageData = array( + $socketFile, + '0', + ); + + // Init main socket + $socketResource = socket_create(AF_UNIX, SOCK_STREAM, 0); + + // Get container from it + $socketInstance = self::createObjectByConfiguredName('socket_container_class', array($socketResource, NULL, $packageData)); + + // Is the socket resource valid? + if (!$socketInstance->isValidSocket()) { + // Something bad happened + throw new InvalidSocketException(array($listenerInstance, $socketInstance), BaseListener::EXCEPTION_INVALID_SOCKET); + } // END - if + + // Get socket error code for verification + $socketError = $socketInstance->getSocketLastError(); + + // Check if there was an error else + if ($socketError > 0) { + // Handle this socket error with a faked recipientData array + $listenerInstance->handleSocketError(__METHOD__, __LINE__, $socketInstance, array('null', '0')); + } // END - if + + // Is the file there? + if ((FrameworkBootstrap::isReachableFilePath($packageData[0])) && (file_exists($packageData[0]))) { + // Old socket found + self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-FILE-LISTENER[' . __METHOD__ . ':' . __LINE__ . ']: WARNING: Old socket at ' . $packageData[0] . ' found. Will not start.'); + + // Shutdown this socket + $socketInstance->shutdownSocket(); + + // Quit here + exit; + } // END - if + + // Debug message + self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-FILE-LISTENER[' . __METHOD__ . ':' . __LINE__ . ']: Binding to ' . $packageData[0] . ' ...'); + + // Try to bind to it + if (!$socketInstance->bindSocketTo($packageData[0])) { + // Handle error here + $listenerInstance->handleSocketError(__METHOD__, __LINE__, $socketInstance, $packageData); + } // END - if + + // Start listen for connections + self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-FILE-LISTENER[' . __METHOD__ . ':' . __LINE__ . ']: Listening for connections.'); + if (!$socketInstance->listenOnSocket()) { + // Handle this socket error with a faked recipientData array + $listenerInstance->handleSocketError(__METHOD__, __LINE__, $socketInstance, $packageData); + } // END - if + + // Now, we want non-blocking mode + self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-FILE-LISTENER[' . __METHOD__ . ':' . __LINE__ . ']: Setting non-blocking mode.'); + if (!$socketInstance->enableSocketNonBlocking()) { + // Handle this socket error with a faked recipientData array + $listenerInstance->handleSocketError(__METHOD__, __LINE__, $socketInstance, $packageData); + } // END - if + + // Return socket instance + return $socketInstance; + } + +} diff --git a/application/hub/classes/factories/states/peer/class_PeerStateFactory.php b/application/hub/classes/factories/states/peer/class_PeerStateFactory.php index 8d7151be3..6e414948f 100644 --- a/application/hub/classes/factories/states/peer/class_PeerStateFactory.php +++ b/application/hub/classes/factories/states/peer/class_PeerStateFactory.php @@ -7,6 +7,7 @@ use Hub\Helper\Connection\ConnectionHelper; // Import framework stuff use CoreFramework\Factory\ObjectFactory; +use CoreFramework\Socket\InvalidSocketException; /** * A factory class for peer states diff --git a/application/hub/classes/handler/network/tcp/class_TcpRawDataHandler.php b/application/hub/classes/handler/network/tcp/class_TcpRawDataHandler.php index a516d9c93..f3622ffec 100644 --- a/application/hub/classes/handler/network/tcp/class_TcpRawDataHandler.php +++ b/application/hub/classes/handler/network/tcp/class_TcpRawDataHandler.php @@ -70,7 +70,7 @@ class TcpRawDataHandler extends BaseRawDataHandler implements Networkable { */ public function processRawDataFromResource (array $socketArray) { // Check the resource - if ((!isset($socketArray[BasePool::SOCKET_ARRAY_RESOURCE])) || (!is_resource($socketArray[BasePool::SOCKET_ARRAY_RESOURCE]))) { + if ((!isset($socketArray[BasePool::SOCKET_ARRAY_INSTANCE])) || (!is_resource($socketArray[BasePool::SOCKET_ARRAY_INSTANCE]))) { // Throw an exception throw new InvalidResourceException($this, self::EXCEPTION_INVALID_RESOURCE); } // END - if @@ -79,33 +79,33 @@ class TcpRawDataHandler extends BaseRawDataHandler implements Networkable { $this->setErrorCode(self::SOCKET_ERROR_UNHANDLED); // Debug message - //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TCP-HANDLER[' . __METHOD__ . ':' . __LINE__ . ']: Handling TCP package from resource=' . $socketArray[BasePool::SOCKET_ARRAY_RESOURCE] . ',type=' . $socketArray[BasePool::SOCKET_ARRAY_CONN_TYPE] . ',last error=' . socket_strerror($this->lastSocketError)); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TCP-HANDLER[' . __METHOD__ . ':' . __LINE__ . ']: Handling TCP package from resource=' . $socketArray[BasePool::SOCKET_ARRAY_INSTANCE] . ',type=' . $socketArray[BasePool::SOCKET_ARRAY_CONN_TYPE] . ',last error=' . socket_strerror($this->lastSocketError)); /* * Read the raw data from socket. If you change PHP_BINARY_READ to * PHP_NORMAL_READ, this line will endless block. This script does only * provide simultanous threads, not real. */ - $rawData = socket_read($socketArray[BasePool::SOCKET_ARRAY_RESOURCE], $this->getConfigInstance()->getConfigEntry('tcp_buffer_length'), PHP_BINARY_READ); + $rawData = socket_read($socketArray[BasePool::SOCKET_ARRAY_INSTANCE], $this->getConfigInstance()->getConfigEntry('tcp_buffer_length'), PHP_BINARY_READ); // Get socket error code back - $this->lastSocketError = socket_last_error($socketArray[BasePool::SOCKET_ARRAY_RESOURCE]); + $this->lastSocketError = socket_last_error($socketArray[BasePool::SOCKET_ARRAY_INSTANCE]); // Debug output of read data length - //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TCP-HANDLER[' . __METHOD__ . ':' . __LINE__ . ']: rawData[' . gettype($rawData) . ']=' . strlen($rawData) . ',MD5=' . md5($rawData) . ',resource=' . $socketArray[BasePool::SOCKET_ARRAY_RESOURCE] . ',error=' . socket_strerror($this->lastSocketError)); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TCP-HANDLER[' . __METHOD__ . ':' . __LINE__ . ']: rawData[' . gettype($rawData) . ']=' . strlen($rawData) . ',MD5=' . md5($rawData) . ',resource=' . $socketArray[BasePool::SOCKET_ARRAY_INSTANCE] . ',error=' . socket_strerror($this->lastSocketError)); //* NOISY-DEBUG: */ if ($rawData !== FALSE) self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TCP-HANDLER[' . __METHOD__ . ':' . __LINE__ . ']: rawData=' . $rawData); // Is it valid? if ($this->lastSocketError == 11) { // Debug message - //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TCP-HANDLER[' . __METHOD__ . ':' . __LINE__ . ']: Ignoring error 11 (Resource temporary unavailable) from socket resource=' . $socketArray[BasePool::SOCKET_ARRAY_RESOURCE]); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TCP-HANDLER[' . __METHOD__ . ':' . __LINE__ . ']: Ignoring error 11 (Resource temporary unavailable) from socket resource=' . $socketArray[BasePool::SOCKET_ARRAY_INSTANCE]); /* * Error code 11 (Resource temporary unavailable) can be safely * ignored on non-blocking sockets. The socket is currently not * sending any data. */ - socket_clear_error($socketArray[BasePool::SOCKET_ARRAY_RESOURCE]); + socket_clear_error($socketArray[BasePool::SOCKET_ARRAY_INSTANCE]); // Skip any further processing return; diff --git a/application/hub/classes/handler/network/udp/class_UdpRawDataHandler.php b/application/hub/classes/handler/network/udp/class_UdpRawDataHandler.php index d2b0d836c..39e8d123f 100644 --- a/application/hub/classes/handler/network/udp/class_UdpRawDataHandler.php +++ b/application/hub/classes/handler/network/udp/class_UdpRawDataHandler.php @@ -67,13 +67,13 @@ class UdpRawDataHandler extends BaseRawDataHandler implements Networkable { */ public function processRawDataFromResource (array $socketArray) { // Check the resource - if ((!isset($socketArray[BasePool::SOCKET_ARRAY_RESOURCE])) || (!is_resource($socketArray[BasePool::SOCKET_ARRAY_RESOURCE]))) { + if ((!isset($socketArray[BasePool::SOCKET_ARRAY_INSTANCE])) || (!is_resource($socketArray[BasePool::SOCKET_ARRAY_INSTANCE]))) { // Throw an exception throw new InvalidResourceException($this, self::EXCEPTION_INVALID_RESOURCE); } // END - if // Implement processing here - $this->partialStub('Please implement this method. resource=' . $socketArray[BasePool::SOCKET_ARRAY_RESOURCE] . ',type=' . $socketArray[BasePool::SOCKET_ARRRAY_CONN_TYPE]); + $this->partialStub('Please implement this method. resource=' . $socketArray[BasePool::SOCKET_ARRAY_INSTANCE] . ',type=' . $socketArray[BasePool::SOCKET_ARRRAY_CONN_TYPE]); } } diff --git a/application/hub/classes/helper/connection/class_ b/application/hub/classes/helper/connection/class_ index eabd3cd80..c256834ce 100644 --- a/application/hub/classes/helper/connection/class_ +++ b/application/hub/classes/helper/connection/class_ @@ -47,12 +47,10 @@ class ???ConnectionHelper extends BaseConnectionHelper implements ConnectionHelp * Creates a socket resource ("connection") for given recipient in package data * * @param $packageData Raw package data - * @return $socketResource Socket resource + * @return $socketInstance An instance of a StorableSocket class */ public static function createConnectionFromPackageData (array $packageData) { die(); } -} -// [EOF] -?> +} diff --git a/application/hub/classes/helper/connection/class_BaseConnectionHelper.php b/application/hub/classes/helper/connection/class_BaseConnectionHelper.php index 8b3796f7f..10fd8441c 100644 --- a/application/hub/classes/helper/connection/class_BaseConnectionHelper.php +++ b/application/hub/classes/helper/connection/class_BaseConnectionHelper.php @@ -284,7 +284,6 @@ class BaseConnectionHelper extends BaseHubSystemHelper implements Visitable, Reg * * @param $packageData Raw package data * @return void - * @throws InvalidSocketException If we got a problem with this socket */ public function sendRawPackageData (array $packageData) { // The helper's state must be 'connected' diff --git a/application/hub/classes/helper/connection/ipv4/class_BaseIpV4ConnectionHelper.php b/application/hub/classes/helper/connection/ipv4/class_BaseIpV4ConnectionHelper.php index a0947c038..f46985914 100644 --- a/application/hub/classes/helper/connection/ipv4/class_BaseIpV4ConnectionHelper.php +++ b/application/hub/classes/helper/connection/ipv4/class_BaseIpV4ConnectionHelper.php @@ -3,6 +3,7 @@ namespace Hub\Helper\Connection\IpV4; // Import application-specific stuff +use Hub\Container\Socket\StorableSocket; use Hub\Helper\Connection\BaseConnectionHelper; use Hub\Locator\Node\UniversalNodeLocator; @@ -72,17 +73,14 @@ class BaseIpV4ConnectionHelper extends BaseConnectionHelper { * @throws SocketOptionException If setting any socket option fails */ protected function initConnection () { - // Get socket resource - $socketResource = $this->getSocketResource(); - // Set the option to reuse the port - if (!socket_set_option($socketResource, SOL_SOCKET, SO_REUSEADDR, 1)) { + if (!$this->getSocketInstance()->enableReuseAddress()) { // Handle this socket error with a faked recipientData array - $this->handleSocketError(__METHOD__, __LINE__, $socketResource, array('0.0.0.0', '0')); + $this->handleSocketError(__METHOD__, __LINE__, $this->getSocketInstance(), array('0.0.0.0', '0')); // And throw again // @TODO Move this to the socket error handler - throw new SocketOptionException(array($this, $socketResource, $socketError, $errorMessage), SocketHandler::EXCEPTION_INVALID_SOCKET); + throw new SocketOptionException(array($this, $this->getSocketInstance(), $socketError, $errorMessage), SocketHandler::EXCEPTION_INVALID_SOCKET); } // END - if /* @@ -90,12 +88,12 @@ class BaseIpV4ConnectionHelper extends BaseConnectionHelper { * it. This is now the default behaviour for all connection helpers who * call initConnection(); . */ - if (!socket_set_nonblock($socketResource)) { + if (!$this->getSocketInstance()->enableSocketNonBlocking()) { // Handle this socket error with a faked recipientData array - $helperInstance->handleSocketError(__METHOD__, __LINE__, $socketResource, array('0.0.0.0', '0')); + $helperInstance->handleSocketError(__METHOD__, __LINE__, $this->getSocketInstance(), array('0.0.0.0', '0')); // And throw again - throw new SocketOptionException(array($helperInstance, $socketResource, $socketError, $errorMessage), SocketHandler::EXCEPTION_INVALID_SOCKET); + throw new SocketOptionException(array($helperInstance, $this->getSocketInstance(), $socketError, $errorMessage), SocketHandler::EXCEPTION_INVALID_SOCKET); } // END - if // Last step: mark connection as initialized @@ -121,20 +119,19 @@ class BaseIpV4ConnectionHelper extends BaseConnectionHelper { assert(isset($unlData[UniversalNodeLocator::UNL_PART_PORT])); // "Cache" socket resource and timeout config - $socketResource = $this->getSocketResource(); $timeout = $this->getConfigInstance()->getConfigEntry('socket_timeout_seconds'); // Debug output - self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER[' . __METHOD__ . ':' . __LINE__ . ']: Trying to connect to ' . $unlData[UniversalNodeLocator::UNL_PART_ADDRESS] . ':' . $unlData[UniversalNodeLocator::UNL_PART_PORT] . ' with socketResource[' . gettype($socketResource) . ']=' . $socketResource . ' ...'); + self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER[' . __METHOD__ . ':' . __LINE__ . ']: Trying to connect to ' . $unlData[UniversalNodeLocator::UNL_PART_ADDRESS] . ':' . $unlData[UniversalNodeLocator::UNL_PART_PORT] . ' with socketResource[' . gettype($this->getSocketInstance()->getSocketResource() . ']=' . $this->getSocketInstance()->getSocketResource() . ' ...'); // Get current time $hasTimedOut = FALSE; $time = time(); // Try to connect until it is connected - while ($isConnected = !@socket_connect($socketResource, $unlData[UniversalNodeLocator::UNL_PART_ADDRESS], $unlData[UniversalNodeLocator::UNL_PART_PORT])) { + while ($isConnected = !@socket_connect($this->getSocketInstance(), $unlData[UniversalNodeLocator::UNL_PART_ADDRESS], $unlData[UniversalNodeLocator::UNL_PART_PORT])) { // Get last socket error - $socketError = socket_last_error($socketResource); + $socketError = socket_last_error($this->getSocketInstance()); // Log error code and status /* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER[' . __METHOD__ . ':' . __LINE__ . ']: socketError=' . $socketError . ',isConnected=' . intval($isConnected)); @@ -181,7 +178,7 @@ class BaseIpV4ConnectionHelper extends BaseConnectionHelper { $isConnected = TRUE; // Clear error - socket_clear_error($socketResource); + socket_clear_error($this->getSocketInstance()); } // END - if // Is the peer connected? @@ -221,92 +218,92 @@ class BaseIpV4ConnectionHelper extends BaseConnectionHelper { * Handles socket error 'connection timed out', but does not clear it for * later debugging purposes. * - * @param $socketResource A valid socket resource + * @param $socketInstance An instance of a StorableSocket class * @param $unlData A valid UNL data array * @return void * @throws SocketConnectionException The connection attempts fails with a time-out */ - protected function socketErrorConnectionTimedOutHandler ($socketResource, array $unlData) { + protected function socketErrorConnectionTimedOutHandler (StorableSocket $socketInstance, array $unlData) { // Get socket error code for verification - $socketError = socket_last_error($socketResource); + $socketError = $socketInstance->getLastSocketError(); // Get error message - $errorMessage = socket_strerror($socketError); + $errorMessage = $socketInstance->getLastSocketErrorMessage(); // Shutdown this socket - $this->shutdownSocket($socketResource); + $socketInstance->shutdownSocket(); // Throw it again - throw new SocketConnectionException(array($this, $socketResource, $socketError, $errorMessage), SocketHandler::EXCEPTION_INVALID_SOCKET); + throw new SocketConnectionException(array($this, $socketInstance, $socketError, $errorMessage), SocketHandler::EXCEPTION_INVALID_SOCKET); } /** * Handles socket error 'resource temporary unavailable', but does not * clear it for later debugging purposes. * - * @param $socketResource A valid socket resource + * @param $socketInstance An instance of a StorableSocket class * @param $unlData A valid UNL data array * @return void * @throws SocketConnectionException The connection attempts fails with a time-out */ - protected function socketErrorResourceUnavailableHandler ($socketResource, array $unlData) { + protected function socketErrorResourceUnavailableHandler (StorableSocket $socketInstance, array $unlData) { // Get socket error code for verification - $socketError = socket_last_error($socketResource); + $socketError = $socketInstance->getLastSocketError(); // Get error message - $errorMessage = socket_strerror($socketError); + $errorMessage = $socketInstance->getLastSocketErrorMessage(); // Shutdown this socket - $this->shutdownSocket($socketResource); + $socketInstance->shutdownSocket(); // Throw it again - throw new SocketConnectionException(array($this, $socketResource, $socketError, $errorMessage), SocketHandler::EXCEPTION_INVALID_SOCKET); + throw new SocketConnectionException(array($this, $socketInstance, $socketError, $errorMessage), SocketHandler::EXCEPTION_INVALID_SOCKET); } /** * Handles socket error 'connection refused', but does not clear it for * later debugging purposes. * - * @param $socketResource A valid socket resource + * @param $socketInstance An instance of a StorableSocket class * @param $unlData A valid UNL data array * @return void * @throws SocketConnectionException The connection attempts fails with a time-out */ - protected function socketErrorConnectionRefusedHandler ($socketResource, array $unlData) { + protected function socketErrorConnectionRefusedHandler (StorableSocket $socketInstance, array $unlData) { // Get socket error code for verification - $socketError = socket_last_error($socketResource); + $socketError = $socketInstance->getLastSocketError(); // Get error message - $errorMessage = socket_strerror($socketError); + $errorMessage = $socketInstance->getLastSocketErrorMessage(); // Shutdown this socket - $this->shutdownSocket($socketResource); + $socketInstance->shutdownSocket(); // Throw it again - throw new SocketConnectionException(array($this, $socketResource, $socketError, $errorMessage), SocketHandler::EXCEPTION_INVALID_SOCKET); + throw new SocketConnectionException(array($this, $socketInstance, $socketError, $errorMessage), SocketHandler::EXCEPTION_INVALID_SOCKET); } /** * Handles socket error 'no route to host', but does not clear it for later * debugging purposes. * - * @param $socketResource A valid socket resource + * @param $socketInstance An instance of a StorableSocket class * @param $unlData A valid UNL data array * @return void * @throws SocketConnectionException The connection attempts fails with a time-out */ - protected function socketErrorNoRouteToHostHandler ($socketResource, array $unlData) { + protected function socketErrorNoRouteToHostHandler (StorableSocket $socketInstance, array $unlData) { // Get socket error code for verification - $socketError = socket_last_error($socketResource); + $socketError = $socketInstance->getLastSocketError(); // Get error message - $errorMessage = socket_strerror($socketError); + $errorMessage = $socketInstance->getLastSocketErrorMessage(); // Shutdown this socket - $this->shutdownSocket($socketResource); + $socketInstance->shutdownSocket(); // Throw it again - throw new SocketConnectionException(array($this, $socketResource, $socketError, $errorMessage), SocketHandler::EXCEPTION_INVALID_SOCKET); + throw new SocketConnectionException(array($this, $socketInstance, $socketError, $errorMessage), SocketHandler::EXCEPTION_INVALID_SOCKET); } /** @@ -314,57 +311,57 @@ class BaseIpV4ConnectionHelper extends BaseConnectionHelper { * method connectToPeerByUnlData() on timed out connection * attempts. * - * @param $socketResource A valid socket resource + * @param $socketInstance An instance of a StorableSocket class * @param $unlData A valid UNL data array * @return void * @throws SocketConnectionException The connection attempts fails with a time-out */ - protected function socketErrorOperationAlreadyProgressHandler ($socketResource, array $unlData) { + protected function socketErrorOperationAlreadyProgressHandler (StorableSocket $socketInstance, array $unlData) { // Get socket error code for verification - $socketError = socket_last_error($socketResource); + $socketError = $socketInstance->getLastSocketError(); // Get error message - $errorMessage = socket_strerror($socketError); + $errorMessage = $socketInstance->getLastSocketErrorMessage(); // Half-shutdown this socket (see there for difference to shutdownSocket()) - $this->halfShutdownSocket($socketResource); + $socketInstance->halfShutdownSocket(); // Throw it again - throw new SocketConnectionException(array($this, $socketResource, $socketError, $errorMessage), SocketHandler::EXCEPTION_INVALID_SOCKET); + throw new SocketConnectionException(array($this, $socketInstance, $socketError, $errorMessage), SocketHandler::EXCEPTION_INVALID_SOCKET); } /** * Handles socket error 'connection reset by peer', but does not clear it for * later debugging purposes. * - * @param $socketResource A valid socket resource + * @param $socketInstance An instance of a StorableSocket class * @param $unlData A valid UNL data array * @return void * @throws SocketConnectionException The connection attempts fails with a time-out */ - protected function socketErrorConnectionResetByPeerHandler ($socketResource, array $unlData) { + protected function socketErrorConnectionResetByPeerHandler (StorableSocket $socketInstance, array $unlData) { // Get socket error code for verification - $socketError = socket_last_error($socketResource); + $socketError = $socketInstance->getLastSocketError(); // Get error message - $errorMessage = socket_strerror($socketError); + $errorMessage = $socketInstance->getLastSocketErrorMessage(); // Shutdown this socket - $this->shutdownSocket($socketResource); + $socketInstance->shutdownSocket(); // Throw it again - throw new SocketConnectionException(array($this, $socketResource, $socketError, $errorMessage), SocketHandler::EXCEPTION_INVALID_SOCKET); + throw new SocketConnectionException(array($this, $socketInstance, $socketError, $errorMessage), SocketHandler::EXCEPTION_INVALID_SOCKET); } /** * Handles socket "error" 'operation now in progress' which can be safely * passed on with non-blocking connections. * - * @param $socketResource A valid socket resource + * @param $socketInstance An instance of a StorableSocket class * @param $unlData A valid UNL data array * @return void */ - protected function socketErrorOperationInProgressHandler ($socketResource, array $unlData) { + protected function socketErrorOperationInProgressHandler (StorableSocket $socketInstance, array $unlData) { self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CONNECTION-HELPER[' . __METHOD__ . ':' . __LINE__ . ']: Operation is now in progress, this is usual for non-blocking connections and is no bug.'); } } diff --git a/application/hub/classes/helper/connection/ipv4/udp/class_UdpConnectionHelper.php b/application/hub/classes/helper/connection/ipv4/udp/class_UdpConnectionHelper.php index 22b8711fa..24b3c3a63 100644 --- a/application/hub/classes/helper/connection/ipv4/udp/class_UdpConnectionHelper.php +++ b/application/hub/classes/helper/connection/ipv4/udp/class_UdpConnectionHelper.php @@ -48,7 +48,7 @@ class UdpConnectionHelper extends BaseIpV4ConnectionHelper implements Connection * connect to the other node. * * @param $packageData Raw package data - * @return $socketResource Socket resource + * @return $socketInstance An instance of a StorableSocket class */ public static function createConnectionFromPackageData (array $packageData) { $this->debugBackTrace('[' . __METHOD__ . ':' . __LINE__ . ']: Unfinished method, packageData[]=' . count($packageData)); diff --git a/application/hub/classes/listener/class_BaseListener.php b/application/hub/classes/listener/class_BaseListener.php index a36d55c91..7d7f75f68 100644 --- a/application/hub/classes/listener/class_BaseListener.php +++ b/application/hub/classes/listener/class_BaseListener.php @@ -3,13 +3,14 @@ namespace Hub\Listener; // Import application-specific stuff +use Hub\Container\Socket\StorableSocket; +use Hub\Factory\Information\Connection\ConnectionInfoFactory; use Hub\Handler\RawData\BaseRawDataHandler; use Hub\Helper\Connection\BaseConnectionHelper; use Hub\Network\Package\NetworkPackage; use Hub\Pool\Peer\PoolablePeer; // Import framework stuff -use CoreFramework\Factory\Connection\ConnectionInfoFactory; use CoreFramework\Factory\ObjectFactory; use CoreFramework\Factory\Registry\Socket\SocketRegistryFactory; use CoreFramework\Generic\UnsupportedOperationException; @@ -81,30 +82,6 @@ class BaseListener extends BaseFrameworkSystem implements Visitable { parent::__construct($className); } - /** - * Checks whether the given socket resource is a server socket - * - * @param $socketResource A valid socket resource - * @return $isServerSocket Whether the socket resource is a server socket - */ - protected function isServerSocketResource ($socketResource) { - // Check it - $isServerSocket = ((is_resource($socketResource)) && (!@socket_getpeername($socketResource, $peerName))); - - // We need to clear the error here if it is a resource - if ($isServerSocket === true) { - // Clear the error - //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('socketResource[]=' . gettype($socketResource)); - socket_clear_error($socketResource); - } // END - if - - // Check peer name, it must be empty - $isServerSocket = (($isServerSocket) && (empty($peerName))); - - // Return result - return $isServerSocket; - } - /** * Setter for listen address * @@ -216,17 +193,17 @@ class BaseListener extends BaseFrameworkSystem implements Visitable { * will be done in a seperate class to allow package writers to use it * again. * - * @param $socketResource A valid server socket resource + * @param $socketInstance An instance of a StorableSocket class * @return void * @throws InvalidServerSocketException If the given resource is no server socket * @throws SocketAlreadyRegisteredException If the given resource is already registered */ - protected function registerServerSocketResource ($socketResource) { + protected function registerServerSocketResource (StorableSocket $socketInstance) { // First check if it is valid - if (!$this->isServerSocketResource($socketResource)) { + if (!$socketInstance->isServerSocketResource()) { // No server socket - throw new InvalidServerSocketException(array($this, $socketResource), self::EXCEPTION_INVALID_SOCKET); - } elseif ($this->isServerSocketRegistered($socketResource)) { + throw new InvalidServerSocketException(array($this, $socketInstance->getSocketResource()), self::EXCEPTION_INVALID_SOCKET); + } elseif ($this->isServerSocketRegistered($socketInstance)) { // Already registered throw new SocketAlreadyRegisteredException($this, self::EXCEPTION_SOCKET_ALREADY_REGISTERED); } @@ -241,19 +218,19 @@ class BaseListener extends BaseFrameworkSystem implements Visitable { $infoInstance->fillWithListenerInformation($this); // Register the socket - $registryInstance->registerSocket($infoInstance, $socketResource); + $registryInstance->registerSocket($infoInstance, $socketInstance); // And set it here - $this->setSocketResource($socketResource); + $this->setSocketInstance($socketInstance); } /** * Checks whether given socket resource is registered in socket registry * - * @param $socketResource A valid server socket resource + * @param $socketInstance An instance of a StorableSocket class * @return $isRegistered Whether given server socket is registered */ - protected function isServerSocketRegistered ($socketResource) { + protected function isServerSocketRegistered (StorableSocket $socketInstance) { // Get a socket registry instance (singleton) $registryInstance = SocketRegistryFactory::createSocketRegistryInstance(); @@ -264,7 +241,7 @@ class BaseListener extends BaseFrameworkSystem implements Visitable { $infoInstance->fillWithListenerInformation($this); // Check it - $isRegistered = $registryInstance->isSocketRegistered($infoInstance, $socketResource); + $isRegistered = $registryInstance->isSocketRegistered($infoInstance, $socketInstance); // Return result return $isRegistered; @@ -397,87 +374,11 @@ class BaseListener extends BaseFrameworkSystem implements Visitable { return $errorName; } - /** - * Shuts down a given socket resource. This method does only ease calling - * the right visitor. - * - * @param $socketResource A valid socket resource - * @return void - */ - public function shutdownSocket ($socketResource) { - // Debug message - self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('HUB-SYSTEM: Shutting down socket resource ' . $socketResource . ' with state ' . $this->getPrintableState() . ' ...'); - - // Set socket resource - $this->setSocketResource($socketResource); - - // Get a visitor instance - $visitorInstance = ObjectFactory::createObjectByConfiguredName('shutdown_socket_visitor_class'); - - // Debug output - self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('HUB-SYSTEM:' . $this->__toString() . ': visitorInstance=' . $visitorInstance->__toString()); - - // Call the visitor - $this->accept($visitorInstance); - } - - /** - * Half-shuts down a given socket resource. This method does only ease calling - * an other visitor than shutdownSocket() does. - * - * @param $socketResource A valid socket resource - * @return void - */ - public function halfShutdownSocket ($socketResource) { - // Debug message - self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('HUB-SYSTEM: Half-shutting down socket resource ' . $socketResource . ' with state ' . $this->getPrintableState() . ' ...'); - - // Set socket resource - $this->setSocketResource($socketResource); - - // Get a visitor instance - $visitorInstance = ObjectFactory::createObjectByConfiguredName('half_shutdown_socket_visitor_class'); - - // Debug output - self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('HUB-SYSTEM:' . $this->__toString() . ': visitorInstance=' . $visitorInstance->__toString()); - - // Call the visitor - $this->accept($visitorInstance); - } - - // ************************************************************************ - // Socket error handler call-back methods - // ************************************************************************ - - /** - * Handles socket error 'permission denied', but does not clear it for - * later debugging purposes. - * - * @param $socketResource A valid socket resource - * @param $socketData A valid socket data array (0 = IP/file name, 1 = port) - * @return void - * @throws SocketBindingException The socket could not be bind to - */ - protected function socketErrorPermissionDeniedHandler ($socketResource, array $socketData) { - // Get socket error code for verification - $socketError = socket_last_error($socketResource); - - // Get error message - $errorMessage = socket_strerror($socketError); - - // Shutdown this socket - $this->shutdownSocket($socketResource); - - // Throw it again - throw new SocketBindingException(array($this, $socketData, $socketResource, $socketError, $errorMessage), BaseListener::EXCEPTION_INVALID_SOCKET); - } - /** * "Listens" for incoming network packages * * @param $peerSuffix Suffix for peer name (e.g. :0 for TCP(/UDP?) connections) * @return void - * @throws InvalidSocketException If an invalid socket resource has been found */ protected function doListenSocketSelect ($peerSuffix) { // Check on all instances @@ -599,8 +500,8 @@ class BaseListener extends BaseFrameworkSystem implements Visitable { $currentSocketData = $this->getIteratorInstance()->current(); // Handle it here, if not main server socket - //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TCP-LISTENER[' . __METHOD__ . ':' . __LINE__ . ']: currentSocketData=' . $currentSocketData[BasePool::SOCKET_ARRAY_RESOURCE] . ',type=' . $currentSocketData[BasePool::SOCKET_ARRAY_CONN_TYPE] . ',serverSocket=' . $this->getSocketResource()); - if (($currentSocketData[BasePool::SOCKET_ARRAY_CONN_TYPE] != BaseConnectionHelper::CONNECTION_TYPE_SERVER) && ($currentSocketData[BasePool::SOCKET_ARRAY_RESOURCE] != $this->getSocketResource())) { + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('TCP-LISTENER[' . __METHOD__ . ':' . __LINE__ . ']: currentSocketData=' . $currentSocketData[BasePool::SOCKET_ARRAY_INSTANCE] . ',type=' . $currentSocketData[BasePool::SOCKET_ARRAY_CONN_TYPE] . ',serverSocket=' . $this->getSocketInstance()->getSocketResource()); + if (($currentSocketData[BasePool::SOCKET_ARRAY_CONN_TYPE] != BaseConnectionHelper::CONNECTION_TYPE_SERVER) && (!$currentSocketData[BasePool::SOCKET_ARRAY_INSTANCE]->equals($this->getSocketInstance()))) { // ... or else it will raise warnings like 'Transport endpoint is not connected' $this->getHandlerInstance()->processRawDataFromResource($currentSocketData); } // END - if @@ -609,4 +510,31 @@ class BaseListener extends BaseFrameworkSystem implements Visitable { $this->getIteratorInstance()->next(); } + // ************************************************************************ + // Socket error handler call-back methods + // ************************************************************************ + + /** + * Handles socket error 'permission denied', but does not clear it for + * later debugging purposes. + * + * @param $socketInstance An instance of a StorableSocket class + * @param $socketData A valid socket data array (0 = IP/file name, 1 = port) + * @return void + * @throws SocketBindingException The socket could not be bind to + */ + protected function socketErrorPermissionDeniedHandler (StorableSocket $socketInstance, array $socketData) { + // Get socket error code for verification + $socketError = $socketInstance->getSocketLastError(); + + // Get error message + $errorMessage = $socketInstance->getSocketLastErrorMessage(); + + // Shutdown this socket + $socketInstance->shutdownSocket(); + + // Throw it again + throw new SocketBindingException(array($this, $socketData, $socketInstance, $socketError, $errorMessage), BaseListener::EXCEPTION_INVALID_SOCKET); + } + } diff --git a/application/hub/classes/listener/socket/class_SocketFileListener.php b/application/hub/classes/listener/socket/class_SocketFileListener.php index b335ac3d0..bd205883d 100644 --- a/application/hub/classes/listener/socket/class_SocketFileListener.php +++ b/application/hub/classes/listener/socket/class_SocketFileListener.php @@ -3,6 +3,7 @@ namespace Hub\Listener\Socket; // Import application-specific stuff +use Hub\Factory\Socket\SocketFactory; use Hub\Helper\Connection\BaseConnectionHelper; use Hub\Listener\BaseListener; @@ -65,116 +66,18 @@ class SocketFileListener extends BaseListener implements Listenable { * * @return void */ - public function initListener() { - // Init socket - $mainSocket = socket_create(AF_UNIX, SOCK_STREAM, 0); - - // Is the socket resource valid? - if (!is_resource($mainSocket)) { - // Something bad happened - throw new InvalidSocketException(array($this, $mainSocket), BaseListener::EXCEPTION_INVALID_SOCKET); - } // END - if - - // Get socket error code for verification - $socketError = socket_last_error($mainSocket); - - // Check if there was an error else - if ($socketError > 0) { - // Handle this socket error with a faked recipientData array - $this->handleSocketError(__METHOD__, __LINE__, $mainSocket, array('null', '0')); - } // END - if - - // Create file name - $socketFile = self::createTempPathForFile($this->getConfigInstance()->getConfigEntry('ipc_socket_file_name')); - - // Debug message - self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-FILE-LISTENER[' . __METHOD__ . ':' . __LINE__ . ']: socketFile=' . $socketFile . ' ...'); - - // File name must not be empty - assert(!empty($socketFile)); - - // Is the file there? - if ((FrameworkBootstrap::isReachableFilePath($socketFile)) && (file_exists($socketFile))) { - // Old socket found - self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-FILE-LISTENER[' . __METHOD__ . ':' . __LINE__ . ']: WARNING: Old socket at ' . $socketFile . ' found. Will not start.'); - - // Shutdown this socket - $this->shutdownSocket($mainSocket); - - // Quit here - exit; - } // END - if - - // Debug message - self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-FILE-LISTENER[' . __METHOD__ . ':' . __LINE__ . ']: Binding to ' . $socketFile . ' ...'); - - // Try to bind to it - if (!socket_bind($mainSocket, $socketFile)) { - // Handle error here - $this->handleSocketError(__METHOD__, __LINE__, $mainSocket, array($socketFile, '0')); - /* - // Get socket error code for verification - $socketError = socket_last_error($mainSocket); - - // Get error message - $errorMessage = socket_strerror($socketError); - - // Shutdown this socket - $this->shutdownSocket($mainSocket); - - // And throw again - throw new InvalidSocketException(array($this, $mainSocket, $socketError, $errorMessage), BaseListener::EXCEPTION_INVALID_SOCKET); - */ - } // END - if - - // Start listen for connections - self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-FILE-LISTENER[' . __METHOD__ . ':' . __LINE__ . ']: Listening for connections.'); - if (!socket_listen($mainSocket)) { - // Handle this socket error with a faked recipientData array - $this->handleSocketError(__METHOD__, __LINE__, $mainSocket, array($socketFile, '0')); - /* - // Get socket error code for verification - $socketError = socket_last_error($mainSocket); - - // Get error message - $errorMessage = socket_strerror($socketError); - - // Shutdown this socket - $this->shutdownSocket($mainSocket); - - // And throw again - throw new InvalidSocketException(array($this, $mainSocket, $socketError, $errorMessage), BaseListener::EXCEPTION_INVALID_SOCKET); - */ - } // END - if - - // Now, we want non-blocking mode - self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-FILE-LISTENER[' . __METHOD__ . ':' . __LINE__ . ']: Setting non-blocking mode.'); - if (!socket_set_nonblock($mainSocket)) { - // Handle this socket error with a faked recipientData array - $this->handleSocketError(__METHOD__, __LINE__, $mainSocket, array($socketFile, '0')); - /* - // Get socket error code for verification - $socketError = socket_last_error($mainSocket); - - // Get error message - $errorMessage = socket_strerror($socketError); - - // Shutdown this socket - $this->shutdownSocket($mainSocket); - - // And throw again - throw new InvalidSocketException(array($this, $mainSocket, $socketError, $errorMessage), BaseListener::EXCEPTION_INVALID_SOCKET); - */ - } // END - if + public function initListener () { + // Create socket with factory + $socketInstance = SocketFactory::createFileSocket($this); // Set the main socket - $this->registerServerSocketResource($mainSocket); + $this->registerServerSocketInstance($socketInstance); // Initialize the peer pool instance $poolInstance = ObjectFactory::createObjectByConfiguredName('application_pool_class', array($this)); // Add main socket - $poolInstance->addPeer($mainSocket, BaseConnectionHelper::CONNECTION_TYPE_SERVER); + $poolInstance->addPeer($socketInstance, BaseConnectionHelper::CONNECTION_TYPE_SERVER); // And add it to this listener $this->setPoolInstance($poolInstance); diff --git a/application/hub/classes/listener/tcp/class_TcpListener.php b/application/hub/classes/listener/tcp/class_TcpListener.php index a537746bd..68fb1a8be 100644 --- a/application/hub/classes/listener/tcp/class_TcpListener.php +++ b/application/hub/classes/listener/tcp/class_TcpListener.php @@ -64,6 +64,7 @@ class TcpListener extends BaseListener implements Listenable { * * @return void * @throws InvalidSocketException Thrown if the socket could not be initialized + * @todo Needs rewrite! */ public function initListener () { // Create a streaming socket, of type TCP/IP diff --git a/application/hub/classes/listener/udp/class_UdpListener.php b/application/hub/classes/listener/udp/class_UdpListener.php index 6157f4056..dcb0a0453 100644 --- a/application/hub/classes/listener/udp/class_UdpListener.php +++ b/application/hub/classes/listener/udp/class_UdpListener.php @@ -59,8 +59,8 @@ class UdpListener extends BaseListener implements Listenable { * Initializes the listener by setting up the required socket server * * @return void - * @throws InvalidSocketException Thrown if the socket is invalid or an - * error was detected. + * @throws InvalidSocketException Thrown if the socket is invalid or an error was detected. + * @todo Needs rewrite! */ public function initListener () { // Try to open a UDP socket diff --git a/application/hub/classes/package/class_NetworkPackage.php b/application/hub/classes/package/class_NetworkPackage.php index 415c77533..b74384fc3 100644 --- a/application/hub/classes/package/class_NetworkPackage.php +++ b/application/hub/classes/package/class_NetworkPackage.php @@ -5,6 +5,7 @@ namespace Hub\Network\Package; // Import application-specific stuff use Hub\Factory\Assembler\Package\PackageAssemblerFactory; use Hub\Factory\Dht\DhtObjectFactory; +use Hub\Factory\Information\Connection\ConnectionInfoFactory; use Hub\Factory\Node\NodeObjectFactory; use Hub\Generic\BaseHubSystem; use Hub\Handler\RawData\BaseRawDataHandler; @@ -18,11 +19,11 @@ use Hub\Network\Receive\Receivable; use Hub\Tools\HubTools; // Import framework stuff -use CoreFramework\Factory\Connection\ConnectionInfoFactory; use CoreFramework\Factory\ObjectFactory; use CoreFramework\Factory\Registry\Socket\SocketRegistryFactory; use CoreFramework\Registry\Registry; use CoreFramework\Registry\Registerable; +use CoreFramework\Socket\InvalidSocketException; use CoreFramework\Visitor\Visitable; use CoreFramework\Visitor\Visitor; @@ -605,7 +606,7 @@ class NetworkPackage extends BaseHubSystem implements Deliverable, Receivable, R $discoveryInstance = SocketDiscoveryFactory::createSocketDiscoveryInstance(); // Now discover the right protocol - $socketResource = $discoveryInstance->discoverSocket($packageData, BaseConnectionHelper::CONNECTION_TYPE_OUTGOING); + $socketInstance = $discoveryInstance->discoverSocket($packageData, BaseConnectionHelper::CONNECTION_TYPE_OUTGOING); // Debug message //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE[' . __METHOD__ . ':' . __LINE__ . ']: Reached line ' . __LINE__ . ' after discoverSocket() has been called.'); @@ -630,18 +631,18 @@ class NetworkPackage extends BaseHubSystem implements Deliverable, Receivable, R $infoInstance->fillWithConnectionHelperInformation($helperInstance); // Is it not there? - if ((is_resource($socketResource)) && (!$registryInstance->isSocketRegistered($infoInstance, $socketResource))) { + if (($socketInstance->isValidSocket()) && (!$registryInstance->isSocketRegistered($infoInstance, $socketInstance))) { // Debug message - //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE[' . __METHOD__ . ':' . __LINE__ . ']: Registering socket ' . $socketResource . ' ...'); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE[' . __METHOD__ . ':' . __LINE__ . ']: Registering socket ' . $socketInstance . ' ...'); // Then register it - $registryInstance->registerSocket($infoInstance, $socketResource, $packageData); + $registryInstance->registerSocket($infoInstance, $socketInstance, $packageData); } elseif (!$helperInstance->getStateInstance()->isPeerStateConnected()) { // Is not connected, then we cannot send self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('NETWORK-PACKAGE[' . __METHOD__ . ':' . __LINE__ . ']: Unexpected peer state ' . $helperInstance->getStateInstance()->__toString() . ' detected.'); // Shutdown the socket - $this->shutdownSocket($socketResource); + $socketInstance->shutdownSocket(); } // Debug message diff --git a/application/hub/classes/pools/class_BasePool.php b/application/hub/classes/pools/class_BasePool.php index afef4e8bf..d4ee8efac 100644 --- a/application/hub/classes/pools/class_BasePool.php +++ b/application/hub/classes/pools/class_BasePool.php @@ -39,7 +39,7 @@ abstract class BasePool extends BaseHubSystem implements Poolable, Visitable { /** * Socket array elements */ - const SOCKET_ARRAY_RESOURCE = 'resource'; + const SOCKET_ARRAY_INSTANCE = 'instance'; const SOCKET_ARRAY_CONN_TYPE = 'connection_type'; /** diff --git a/application/hub/classes/pools/peer/class_DefaultPeerPool.php b/application/hub/classes/pools/peer/class_DefaultPeerPool.php index 27a95a48a..995688906 100644 --- a/application/hub/classes/pools/peer/class_DefaultPeerPool.php +++ b/application/hub/classes/pools/peer/class_DefaultPeerPool.php @@ -3,6 +3,7 @@ namespace Hub\Pool\Peer; // Import application-specific stuff +use Hub\Container\Socket\StorableSocket; use Hub\Locator\Node\UniversalNodeLocator; use Hub\Network\Package\NetworkPackage; use Hub\Pool\BasePool; @@ -10,6 +11,7 @@ use Hub\Pool\Peer\PoolablePeer; // Import framework stuff use CoreFramework\Listener\Listenable; +use CoreFramework\Socket\InvalidSocketException; /** * A default peer pool class @@ -64,52 +66,41 @@ class DefaultPeerPool extends BasePool implements PoolablePeer { /** * Validates given socket * - * @param $socketResource A valid socket resource + * @param $socketInstance An instance of a StorableSocket class * @return void * @throws InvalidSocketException If the given socket has an error */ - private function validateSocket ($socketResource) { + private function validateSocket (StorableSocket $socketInstance) { // Is it a valid resource? - if (!is_resource($socketResource)) { + if (!$socketInstance->isValidSocket()) { // Throw an exception - throw new InvalidSocketException(array($this, $socketResource), SocketHandler::EXCEPTION_INVALID_SOCKET); + throw new InvalidSocketException(array($this, $socketInstance), SocketHandler::EXCEPTION_INVALID_SOCKET); } // END - if // Get error code - $errorCode = socket_last_error($socketResource); + $errorCode = $socketInstance->getLastSocketErrorCode(); // Is it without any errors? if ($errorCode > 0) { // Handle the socket error with a faked recipientData array - $this->handleSocketError(__METHOD__, __LINE__, $socketResource, array('0.0.0.0', '0')); - /* - // Get error message - $errorMessage = socket_strerror($errorCode); - - // Shutdown this socket - $this->getListenerInstance()->shutdownSocket($socketResource); - - // And throw again - throw new InvalidSocketException(array($this, $socketResource, $errorCode, $errorMessage), SocketHandler::EXCEPTION_INVALID_SOCKET); - */ + $this->handleSocketError(__METHOD__, __LINE__, $socketInstance, array('0.0.0.0', '0')); } // END - if } /** * Adds a socket resource to the peer pool * - * @param $socketResource A valid (must be!) socket resource + * @param $socketInstance An instance of a StorableSocket class * @param $connectionType Type of connection, can only be 'incoming', 'outgoing' or 'server' * @return void - * @throws InvalidSocketException If the given resource is invalid or errorous * @throws InvalidConnectionTypeException If the provided connection type is not valid */ - public function addPeer ($socketResource, $connectionType) { + public function addPeer (StorableSocket $socketInstance, $connectionType) { // Debug message - //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DEFAULT-PEER-POOL[' . __METHOD__ . ':' . __LINE__ . ']: socketResource[' . gettype($socketResource) . ']=' . $socketResource . ',connectionType=' . $connectionType . ' - CALLED!'); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DEFAULT-PEER-POOL[' . __METHOD__ . ':' . __LINE__ . ']: socketResource[' . gettype($socketInstance->getSocketResource()) . ']=' . $socketInstance->getSocketResource() . ',connectionType=' . $connectionType . ' - CALLED!'); // Validate the socket - $this->validateSocket($socketResource); + $this->validateSocket($socketInstance); // Is the connection type valid? if (!$this->isValidConnectionType($connectionType)) { @@ -121,30 +112,23 @@ class DefaultPeerPool extends BasePool implements PoolablePeer { $peerName = '0.0.0.0'; // The socket resource should not match server socket - if ($socketResource != $this->getListenerInstance()->getSocketResource()) { + if (!$this->getListenerInstance()->getSocketInstance()->equals($socketInstance)) { // Try to determine the peer's IP number - if (!socket_getpeername($socketResource, $peerName)) { + if (!$peerName = $socketInstance->getSocketPeerName()) { // Handle the socket error with a faked recipientData array - $this->handleSocketError(__METHOD__, __LINE__, $socketResource, array('0.0.0.0', '0')); - /* - // Get last error - $lastError = socket_last_error($socketResource); - - // Doesn't work! - throw new InvalidSocketException(array($this, $socketResource, $lastError, socket_strerror($lastError)), SocketHandler::EXCEPTION_INVALID_SOCKET); - */ + $this->handleSocketError(__METHOD__, __LINE__, $socketInstance, array('0.0.0.0', '0')); } // END - if } else { // Server sockets won't work with socket_getpeername() - self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('POOL[' . __METHOD__ . ':' . __LINE__ . ']: Socket resource is server socket (' . $socketResource . '). This is not a bug.'); + self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('POOL[' . __METHOD__ . ':' . __LINE__ . ']: Socket resource is server socket (' . $socketInstance->getSocketResource() . '). This is not a bug.'); } // Debug message - self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('POOL[' . __METHOD__ . ':' . __LINE__ . ']: Adding peer ' . $peerName . ',socketResource=' . $socketResource . ',type=' . $connectionType); + self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('POOL[' . __METHOD__ . ':' . __LINE__ . ']: Adding peer ' . $peerName . ',socketResource=' . $socketInstance->getSocketResource() . ',type=' . $connectionType); // Construct the array $socketArray = array( - self::SOCKET_ARRAY_RESOURCE => $socketResource, + self::SOCKET_ARRAY_INSTANCE => $socketInstance, self::SOCKET_ARRAY_CONN_TYPE => $connectionType ); @@ -180,7 +164,7 @@ class DefaultPeerPool extends BasePool implements PoolablePeer { // "Walk" through all socket arrays foreach ($socketArrays as $socketArray) { // Add the socket - array_push($sockets, $socketArray[self::SOCKET_ARRAY_RESOURCE]); + array_push($sockets, $socketArray[self::SOCKET_ARRAY_INSTANCE]); } // END - foreach // Return it @@ -212,7 +196,7 @@ class DefaultPeerPool extends BasePool implements PoolablePeer { // Does it match? if ($socketArray[self::SOCKET_ARRAY_CONN_TYPE] === $connectionType) { // Add the socket - array_push($sockets, $socketArray[self::SOCKET_ARRAY_RESOURCE]); + array_push($sockets, $socketArray[self::SOCKET_ARRAY_INSTANCE]); } // END - if } // END - foreach @@ -225,12 +209,12 @@ class DefaultPeerPool extends BasePool implements PoolablePeer { * * @param $packageData Raw package data * @param $connectionType Type of connection, can be 'incoming', 'outgoing', 'server' or default - * @return $socketResource Socket resource + * @return $socketInstance An instance of a StorableSocket class * @throws InvalidConnectionTypeException If the provided connection type is not valid */ public function getSocketFromPackageData (array $packageData, $connectionType = NULL) { // Default is no socket - $socketResource = FALSE; + $socketInstance = NULL; // Resolve recipient (UNL) into a handler instance $handlerInstance = ProtocolHandlerFactory::createProtocolHandlerFromPackageData($packageData); @@ -261,35 +245,33 @@ class DefaultPeerPool extends BasePool implements PoolablePeer { // Get all sockets and check them, skip the server socket foreach ($sockets as $socketArray) { // Is this a server socket? - if ($socketArray[self::SOCKET_ARRAY_RESOURCE] === $this->getListenerInstance()->getSocketResource()) { + if ($socketArray[self::SOCKET_ARRAY_INSTANCE]->equals($this->getListenerInstance()->getSocketInstance())) { // Skip 'server' sockets (local socket) - //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('POOL[' . __METHOD__ . ':' . __LINE__ . ']: Skipping server socket ' . $socketArray[self::SOCKET_ARRAY_RESOURCE] . ' ...'); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('POOL[' . __METHOD__ . ':' . __LINE__ . ']: Skipping server socket ' . $socketArray[self::SOCKET_ARRAY_INSTANCE]->getSocketResource() . ' ...'); continue; } // END - if // Try to get the "peer"'s name - if (!socket_getpeername($socketArray[self::SOCKET_ARRAY_RESOURCE], $peerIp)) { + if (!$peerName = $socketArray[self::SOCKET_ARRAY_INSTANCE]->getSocketPeerName()) { // Handle the socket error with given package data - $this->handleSocketError(__METHOD__, __LINE__, $socketArray[self::SOCKET_ARRAY_RESOURCE], explode(':', $packageData[NetworkPackage::PACKAGE_DATA_RECIPIENT])); + $this->handleSocketError(__METHOD__, __LINE__, $socketArray[self::SOCKET_ARRAY_INSTANCE], explode(':', $packageData[NetworkPackage::PACKAGE_DATA_RECIPIENT])); } // END - if // Get // If the "peer" IP and recipient is same, use it - if ($peerIp == $unlData[UniversalNodeLocator::UNL_PART_ADDRESS]) { + if ($peerName == $unlData[UniversalNodeLocator::UNL_PART_ADDRESS]) { // IPs match, so take the socket and quit this loop - $socketResource = $socketArray[self::SOCKET_ARRAY_RESOURCE]; + $socketInstance = $socketArray[self::SOCKET_ARRAY_INSTANCE]; // Debug message - //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('POOL[' . __METHOD__ . ':' . __LINE__ . ']: peerIp=' . $peerIp . ' matches with recipient IP address. Taking socket=' . $socketArray[self::SOCKET_ARRAY_RESOURCE] . ',type=' . $socketArray[self::SOCKET_ARRAY_CONN_TYPE]); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('POOL[' . __METHOD__ . ':' . __LINE__ . ']: peerName=' . $peerName . ' matches with recipient IP address. Taking socket=' . $socketArray[self::SOCKET_ARRAY_INSTANCE] . ',type=' . $socketArray[self::SOCKET_ARRAY_CONN_TYPE]); break; } // END - if } // END - foreach // Return the determined socket resource - //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('POOL[' . __METHOD__ . ':' . __LINE__ . ']: socketResource[' . gettype($socketResource) . ']=' . $socketResource); - return $socketResource; + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('POOL[' . __METHOD__ . ':' . __LINE__ . ']: socketResource[' . gettype($socketInstance->getSocketResource()) . ']=' . $socketInstance->getSocketResource()); + return $socketInstance; } -} -// [EOF] -?> +} diff --git a/application/hub/classes/registry/socket/class_SocketRegistry.php b/application/hub/classes/registry/socket/class_SocketRegistry.php index d6e03a6aa..088da4a0b 100644 --- a/application/hub/classes/registry/socket/class_SocketRegistry.php +++ b/application/hub/classes/registry/socket/class_SocketRegistry.php @@ -3,6 +3,8 @@ namespace Hub\Registry\Socket; // Import application-specific stuff +use Hub\Container\Socket\StorableSocket; +use Hub\Factory\Information\Connection\ConnectionInfoFactory; use Hub\Information\ShareableInfo; use Hub\Network\Package\NetworkPackage; use Hub\Registry\Socket\RegisterableSocket; @@ -148,16 +150,16 @@ class SocketRegistry extends BaseRegistry implements Register, RegisterableSocke } /** - * Checks whether given socket resource is registered. If $socketResource is + * Checks whether given socket resource is registered. If stored socket resource is * FALSE only the instance will be checked. * * @param $infoInstance An instance of a ShareableInfo class - * @param $socketResource A valid socket resource + * @param $socketInstance An instance of a StorableSocket class * @return $isRegistered Whether the given socket resource is registered */ - public function isSocketRegistered (ShareableInfo $infoInstance, $socketResource) { + public function isSocketRegistered (ShareableInfo $infoInstance, StorableSocket $socketInstance) { // Debug message - //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-REGISTRY[' . __METHOD__ . ':' . __LINE__ . ']:info=' . $infoInstance->getProtocolName() . ',socketResource[' . gettype($socketResource) . ']=' . $socketResource . ' - CALLED!'); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-REGISTRY[' . __METHOD__ . ':' . __LINE__ . ']:info=' . $infoInstance->getProtocolName() . ',socketResource[' . gettype($socketInstance->getSocketResource()) . ']=' . $socketInstance->getSocketResource() . ' - CALLED!'); // Default is not registered $isRegistered = FALSE; @@ -168,7 +170,7 @@ class SocketRegistry extends BaseRegistry implements Register, RegisterableSocke $key = $this->getRegistryKeyFromInfo($infoInstance); // Debug message - //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-REGISTRY[' . __METHOD__ . ':' . __LINE__ . ']: this=' . $this->__toString() . ',info=' . $infoInstance->getProtocolName() . ',socketResource[' . gettype($socketResource) . ']=' . $socketResource . ',key=' . $key . ' - Trying to get instance ...'); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-REGISTRY[' . __METHOD__ . ':' . __LINE__ . ']: this=' . $this->__toString() . ',info=' . $infoInstance->getProtocolName() . ',socketResource[' . gettype($socketInstance->getSocketResource()) . ']=' . $socketInstance->getSocketResource() . ',key=' . $key . ' - Trying to get instance ...'); // Get the registry $registryInstance = $this->getInstance($key); @@ -177,7 +179,7 @@ class SocketRegistry extends BaseRegistry implements Register, RegisterableSocke $socketKey = $this->getSubRegistryKey($infoInstance); // Debug message - //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-REGISTRY[' . __METHOD__ . ':' . __LINE__ . ']: this=' . $this->__toString() . ',info=' . $infoInstance->getProtocolName() . ',socketResource[' . gettype($socketResource) . ']=' . $socketResource . ',key=' . $key . ',socketKey=' . $socketKey . ' - Checking existence ...'); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-REGISTRY[' . __METHOD__ . ':' . __LINE__ . ']: this=' . $this->__toString() . ',info=' . $infoInstance->getProtocolName() . ',socketResource[' . gettype($socketInstance->getSocketResource()) . ']=' . $socketInstance->getSocketResource() . ',key=' . $key . ',socketKey=' . $socketKey . ' - Checking existence ...'); // Is it there? if ($registryInstance->instanceExists($socketKey)) { @@ -188,15 +190,15 @@ class SocketRegistry extends BaseRegistry implements Register, RegisterableSocke $registeredInstance = $registryInstance->getInstance($socketKey); // Is it SocketContainer and same socket? - $isRegistered = (($registeredInstance instanceof SocketContainer) && ($registeredInstance->ifSocketResourceMatches($socketResource))); + $isRegistered = (($registeredInstance instanceof SocketContainer) && ($registeredInstance->equals($socketInstance))); // Debug message - //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-REGISTRY[' . __METHOD__ . ':' . __LINE__ . ']: Final result: isRegistered(' . $socketResource . ')=' . intval($isRegistered)); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-REGISTRY[' . __METHOD__ . ':' . __LINE__ . ']: Final result: isRegistered(' . $socketInstance->getSocketResource() . ')=' . intval($isRegistered)); } // END - if } // END - if // Debug message - //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-REGISTRY[' . __METHOD__ . ':' . __LINE__ . ']:info=' . $infoInstance->getProtocolName() . ',socketResource[' . gettype($socketResource) . ']=' . $socketResource . ',isRegistered=' . intval($isRegistered) . ' - EXIT!'); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-REGISTRY[' . __METHOD__ . ':' . __LINE__ . ']:info=' . $infoInstance->getProtocolName() . ',socketResource[' . gettype($socketInstance->getSocketResource()) . ']=' . $socketInstance->getSocketResource() . ',isRegistered=' . intval($isRegistered) . ' - EXIT!'); // Return the result return $isRegistered; @@ -206,19 +208,19 @@ class SocketRegistry extends BaseRegistry implements Register, RegisterableSocke * Registeres given socket for listener or throws an exception if it is already registered * * @param $infoInstance An instance of a ShareableInfo class - * @param $socketResource A valid socket resource + * @param $socketInstance An instance of a StorableSocket class * @param $packageData Optional raw package data * @throws SocketAlreadyRegisteredException If the given socket is already registered * @return void */ - public function registerSocket (ShareableInfo $infoInstance, $socketResource, array $packageData = array()) { + public function registerSocket (ShareableInfo $infoInstance, StorableSocket $socketInstance, array $packageData = array()) { // Debug message - //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-REGISTRY[' . __METHOD__ . ':' . __LINE__ . ']:info=' . $infoInstance->getProtocolName() . ',socketResource[' . gettype($socketResource) . ']=' . $socketResource . ' - CALLED!'); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-REGISTRY[' . __METHOD__ . ':' . __LINE__ . ']:info=' . $infoInstance->getProtocolName() . ',socketResource[' . gettype($socketInstance->getSocketResource()) . ']=' . $socketInstance->getSocketResource() . ' - CALLED!'); // Is the socket already registered? - if ($this->isSocketRegistered($infoInstance, $socketResource)) { + if ($this->isSocketRegistered($infoInstance, $socketInstance)) { // Throw the exception - throw new SocketAlreadyRegisteredException(array($infoInstance, $socketResource), BaseListener::EXCEPTION_SOCKET_ALREADY_REGISTERED); + throw new SocketAlreadyRegisteredException(array($infoInstance, $socketInstance), BaseListener::EXCEPTION_SOCKET_ALREADY_REGISTERED); } // END - if // Does the instance exist? @@ -236,11 +238,8 @@ class SocketRegistry extends BaseRegistry implements Register, RegisterableSocke // Get a key for sub-registries $socketKey = $this->getSubRegistryKey($infoInstance); - // Get a socket container - $socketInstance = ObjectFactory::CreateObjectByConfiguredName('socket_container_class', array($socketResource, $infoInstance, $packageData)); - // We have a sub-registry, the socket key and the socket, now we need to put all together - //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-REGISTRY[' . __METHOD__ . ':' . __LINE__ . ']: socketKey=' . $socketKey . ',socketResource[' . gettype($socketResource) . ']=' . $socketResource . ' - adding socket container instance ...'); + //* DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-REGISTRY[' . __METHOD__ . ':' . __LINE__ . ']: socketKey=' . $socketKey . ',socketResource[' . gettype($socketInstance->getSocketResource()) . ']=' . $socketInstance->getSocketResource() . ' - adding socket container instance ...'); $registryInstance->addInstance($socketKey, $socketInstance); } @@ -248,7 +247,7 @@ class SocketRegistry extends BaseRegistry implements Register, RegisterableSocke * Getter for given listener's socket resource * * @param $listenerInstance An instance of a Listenable class - * @return $socketResource A valid socket resource + * @return $socketInstance An instance of a StorableSocket class * @throws NoSocketRegisteredException If the requested socket is not registered */ public function getRegisteredSocketResource (Listenable $listenerInstance) { @@ -271,13 +270,13 @@ class SocketRegistry extends BaseRegistry implements Register, RegisterableSocke $socketKey = $this->getSubRegistryKey($listenerInstance); // And the final socket resource - $socketResource = $registryInstance->getInstance($socketKey)->getSocketResource(); + $socketInstance = $registryInstance->getInstance($socketKey); // Debug message - //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-REGISTRY[' . __METHOD__ . ':' . __LINE__ . ']:listener=' . $listenerInstance->getConnectionType() . ',socketResource[' . gettype($socketResource) . ']=' . $socketResource . ' - EXIT!'); + //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('SOCKET-REGISTRY[' . __METHOD__ . ':' . __LINE__ . ']:listener=' . $listenerInstance->getConnectionType() . ',socketResource[]=' . gettype($socketInstance) . ' - EXIT!'); // Return the resource - return $socketResource; + return $socketInstance; } /** diff --git a/application/hub/classes/resolver/state/peer/class_PeerStateResolver.php b/application/hub/classes/resolver/state/peer/class_PeerStateResolver.php index 4287b3363..c4241a05d 100644 --- a/application/hub/classes/resolver/state/peer/class_PeerStateResolver.php +++ b/application/hub/classes/resolver/state/peer/class_PeerStateResolver.php @@ -3,8 +3,12 @@ namespace Hub\Resolver\State\Peer; // Import application-specific stuff +use Hub\Container\Socket\StorableSocket; use Hub\Helper\Connection\ConnectionHelper; +// Import framework stuff +use CoreFramework\Socket\InvalidSocketException; + /** * A resolver for resolving peer states locally * @@ -59,12 +63,12 @@ class PeerStateResolver extends BaseStateResolver implements StateResolver { * * @param $helperInstance An instance of a ConnectionHelper class * @param $packageData Raw package data - * @param $socketResource A valid socket resource + * @param $socketInstance An instance of a StorableSocket class * @return $stateInstance An instance of the resolved state * @throws InvalidSocketException If socketResource, even from getSocketResource() is no valid resource * @todo ~30% done */ - public static function resolveStateByPackage (ConnectionHelper $helperInstance, array $packageData, $socketResource) { + public static function resolveStateByPackage (ConnectionHelper $helperInstance, array $packageData, StorableSocket $socketInstance) { // Get temporary resolver instance $resolverInstance = self::createPeerStateResolver(); @@ -72,30 +76,26 @@ class PeerStateResolver extends BaseStateResolver implements StateResolver { $stateInstance = NULL; // Is the socket resource valid? - if (!is_resource($socketResource)) { + // @TODO Maybe no longer needed? + if (!$socketInstance->isValidSocket()) { // No, so get socket resource from helper - $socketResource = $helperInstance->getSocketResource(); + $socketInstance = $helperInstance->getSocketInstance(); // Still no socket resource? - if (!is_resource($socketResource)) { + if (!$socketInstance->isValidSocket())) { // Then abort here with an exception (may happen after socket_shutdown()) - throw new InvalidSocketException(array($helperInstance, $socketResource, 'unknown', 'unknown'), SocketHandler::EXCEPTION_INVALID_SOCKET); + throw new InvalidSocketException(array($helperInstance, $socketInstance, 'unknown', 'unknown'), SocketHandler::EXCEPTION_INVALID_SOCKET); } // END - if } // END - if - // Get error code from it - $errorCode = socket_last_error($socketResource); - // Translate the error code to an own name - $errorCode = $helperInstance->translateSocketErrorCodeToName($errorCode); + $errorName = $socketInstance->translateSocketLastErrorCodeToName(); // Create a state instance based on $errorCode. This factory does the hard work for us - $stateInstance = PeerStateFactory::createPeerStateInstanceBySocketStatusCode($helperInstance, $packageData, $socketResource, $errorCode); + $stateInstance = PeerStateFactory::createPeerStateInstanceBySocketStatusCode($helperInstance, $packageData, $socketInstance, $errorName); // Return the prepared instance return $stateInstance; } -} -// [EOF] -?> +} diff --git a/application/hub/exceptions/socket/class_SocketShutdownException.php b/application/hub/exceptions/socket/class_SocketShutdownException.php index 172b2dd93..0793c6ea8 100644 --- a/application/hub/exceptions/socket/class_SocketShutdownException.php +++ b/application/hub/exceptions/socket/class_SocketShutdownException.php @@ -38,14 +38,14 @@ class SocketShutdownException extends AbstractSocketException { */ public function __construct (ConnectionHelper $helperInstance, $code) { // Get socket resource - $socketResource = $helperInstance->getSocketResource(); + $socketInstance = $helperInstance->getSocketInstance(); // Construct the message $message = sprintf('[%s:] Socket %s cannot be shutdown down. errNo=%s, errStr=%s', $helperInstance->__toString(), - $socketResource, - socket_last_error($socketResource), - socket_strerror(socket_last_error($socketResource)) + $socketInstance->getSocketResource(), + $socketInstance->getLastSocketError(), + $socketInstance->getLastSocketErrorMessage() ); // Call parent exception constructor diff --git a/application/hub/interfaces/container/.htaccess b/application/hub/interfaces/container/.htaccess new file mode 100644 index 000000000..3a4288278 --- /dev/null +++ b/application/hub/interfaces/container/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/application/hub/interfaces/container/socket/.htaccess b/application/hub/interfaces/container/socket/.htaccess new file mode 100644 index 000000000..3a4288278 --- /dev/null +++ b/application/hub/interfaces/container/socket/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/application/hub/interfaces/container/socket/class_StorableSocket.php b/application/hub/interfaces/container/socket/class_StorableSocket.php new file mode 100644 index 000000000..ed5eff206 --- /dev/null +++ b/application/hub/interfaces/container/socket/class_StorableSocket.php @@ -0,0 +1,71 @@ + + * @version 0.0.0 + * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2017 Hub Developer Team + * @license GNU GPL 3.0 or any newer version + * @link http://www.shipsimu.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +interface StorableSocket extends FrameworkInterface { + + /** + * Checks whether the given Universal Node Locator matches with the one from package data + * + * @param $unl A Universal Node Locator + * @return $matches Whether $address matches with the one from package data + */ + function ifAddressMatches ($unl); + + /** + * Checks whether the given socket matches with stored + * + * @param $socketResource A valid socket resource + * @return $matches Whether given socket matches + */ + function ifSocketResourceMatches ($socketResource); + + /** + * Checks whether the stored socket resource is a server socket + * + * @return $isServerSocket Whether the stored socket resource is a server socket + */ + function isServerSocketResource (); + + /** + * Shuts down a given socket resource. This method does only ease calling + * the right visitor. + * + * @return void + */ + function shutdownSocket (); + + /** + * Half-shuts down a given socket resource. This method does only ease calling + * an other visitor than shutdownSocket() does. + * + * @return void + */ + function halfShutdownSocket (); + +} diff --git a/application/hub/interfaces/discovery/recipient/socket/class_DiscoverableSocket.php b/application/hub/interfaces/discovery/recipient/socket/class_DiscoverableSocket.php index 8502aa726..c88c73d3b 100644 --- a/application/hub/interfaces/discovery/recipient/socket/class_DiscoverableSocket.php +++ b/application/hub/interfaces/discovery/recipient/socket/class_DiscoverableSocket.php @@ -28,7 +28,7 @@ interface DiscoverableSocket extends DiscoverableRecipient { * * @param $packageData Raw package data array * @param $connectionType Type of connection, can be 'incoming' or 'outgoing', *NEVER* 'server'! - * @return $socketResource A valid socket resource + * @return $socketInstance An instance of a StorableSocket class * @throws NoListGroupException If the procol group is not found in peer list * @throws NullPointerException If listenerInstance is NULL */ diff --git a/application/hub/interfaces/socket/class_SocketTag.php b/application/hub/interfaces/socket/class_SocketTag.php index b488b6444..bc37e3280 100644 --- a/application/hub/interfaces/socket/class_SocketTag.php +++ b/application/hub/interfaces/socket/class_SocketTag.php @@ -33,7 +33,7 @@ interface SocketTag extends FrameworkInterface { * * @param $packageData Raw package data * @param $connectionType Type of connection, can be 'incoming', 'outgoing', 'server' or default - * @return $socketResource Socket resource + * @return $socketInstance An instance of a StorableSocket class * @throws InvalidConnectionTypeException If the provided connection type is not valid */ function getSocketFromPackageData (array $packageData, $connectionType = NULL); diff --git a/core b/core index 001f7ff82..6e44f1682 160000 --- a/core +++ b/core @@ -1 +1 @@ -Subproject commit 001f7ff82c38dcd58d652ca8acf272716f3f0f04 +Subproject commit 6e44f1682ebbdc9fc64463544e647a9c1d4dd817 diff --git a/docs/TODOs.txt b/docs/TODOs.txt index 9f17dbc70..988a00122 100644 --- a/docs/TODOs.txt +++ b/docs/TODOs.txt @@ -1,398 +1,526 @@ -### WARNING: THIS FILE IS AUTO-GENERATED BY ./todo-builder.sh ### +### WARNING: THIS FILE IS AUTO-GENERATED BY ./contrib/todo-builder.sh ### ### DO NOT EDIT THIS FILE. ### -./application/hub/config.php:772:// @TODO This and the next value is very static again -./application/hub/config.php:836:// @TODO This is very static, rewrite it to more flexible -./application/hub/interfaces/apt-proxy/class_AptProxy.php:10: * @todo We need to find a better name for this interface -./application/hub/interfaces/blocks/class_Minable.php:10: * @todo We need to find a better name for this interface -./application/hub/interfaces/chat/class_Chatter.php:10: * @todo We need to find a better name for this interface -./application/hub/interfaces/crawler/class_Crawler.php:10: * @todo We need to find a better name for this interface -./application/hub/interfaces/cruncher/class_CruncherHelper.php:10: * @todo We need to find a better name for this interface -./application/hub/interfaces/helper/connections/class_ConnectionHelper.php:10: * @todo Please find another name for this interface -./application/hub/interfaces/helper/connections/class_ConnectionHelper.php:38: * @todo We may want to implement a filter for ease notification of other objects like our pool -./application/hub/interfaces/helper/messages/class_MessageHelper.php:10: * @todo Please find another name for this interface -./application/hub/interfaces/helper/nodes/class_NodeHelper.php:10: * @todo We need to find a better name for this interface -./application/hub/interfaces/miner/class_MinerHelper.php:10: * @todo We need to find a better name for this interface -./application/hub/interfaces/wrapper/class_NodeDhtWrapper.php:122: * @todo Add minimum/maximum age limitations -./application/hub/interfaces/wrapper/class_NodeDhtWrapper.php:132: * @todo Add timestamp to dataset instance -./application/hub/main/chains/class_PackageFilterChain.php:54: * @todo This may be slow if a message with a lot tags arrived -./application/hub/main/class_BaseHubSystem.php:604: // @TODO On some systems it is 134, on some 107? -./application/hub/main/commands/console/class_HubConsoleAptProxyCommand.php:107: * @todo Should we add some more filters? -./application/hub/main/commands/console/class_HubConsoleAptProxyCommand.php:58: * @todo Try to create a AptProxyActivationTask or so -./application/hub/main/commands/console/class_HubConsoleChatCommand.php:107: * @todo Should we add some more filters? -./application/hub/main/commands/console/class_HubConsoleChatCommand.php:58: * @todo Try to create a ChatActivationTask or so -./application/hub/main/commands/console/class_HubConsoleCrawlerCommand.php:107: * @todo Should we add some more filters? -./application/hub/main/commands/console/class_HubConsoleCrawlerCommand.php:58: * @todo Try to create a CrawlerActivationTask or so -./application/hub/main/commands/console/class_HubConsoleCruncherCommand.php:107: * @todo Should we add some more filters? -./application/hub/main/commands/console/class_HubConsoleCruncherCommand.php:58: * @todo Try to create a CruncherActivationTask or so -./application/hub/main/commands/console/class_HubConsoleMainCommand.php:114: * @todo Should we add some more filters? -./application/hub/main/commands/console/class_HubConsoleMainCommand.php:58: * @todo Try to create a HubActivationTask or so -./application/hub/main/commands/console/class_HubConsoleMinerCommand.php:107: * @todo Should we add some more filters? -./application/hub/main/commands/console/class_HubConsoleMinerCommand.php:58: * @todo Try to create a MinerActivationTask or so -./application/hub/main/crawler/class_BaseNodeCrawler.php:59: * @todo 0% done -./application/hub/main/cruncher/class_BaseHubCruncher.php:200: * @todo Try to make this method more generic so we can move it in BaseFrameworkSystem -./application/hub/main/cruncher/mcrypt/class_HubMcryptCruncher.php:108: * @todo Implement this method -./application/hub/main/cruncher/mcrypt/class_HubMcryptCruncher.php:138: * @todo 0% done -./application/hub/main/cruncher/mcrypt/class_HubMcryptCruncher.php:98: // @TODO Implement this method -./application/hub/main/dht/class_BaseDht.php:126: * @todo Add minimum/maximum age limitations -./application/hub/main/dht/class_BaseDht.php:160: // @TODO Maybe add more small checks? -./application/hub/main/dht/class_BaseDht.php:202: * @todo Find out if loadDescriptorXml() can be called only once to avoid a lot methods working. -./application/hub/main/dht/class_BaseDht.php:242: * @todo 0% done -./application/hub/main/dht/class_BaseDht.php:253: * @todo Switch flag 'accept_bootstrap' -./application/hub/main/dht/class_BaseDht.php:86: * @todo Find more to do here -./application/hub/main/dht/node/class_NodeDhtFacade.php:61: * @todo Does this data need to be enriched with more meta data? -./application/hub/main/discovery/protocol/class_ProtocolDiscovery.php:94: // @TODO Add some validation here??? -./application/hub/main/discovery/recipient/package/class_PackageRecipientDiscovery.php:115: // @TODO Unfinished: $this->getListInstance()->addEntry('unl', $decodedData[NetworkPackage::PACKAGE_DATA_RECIPIENT]); -./application/hub/main/discovery/recipient/package/class_PackageRecipientDiscovery.php:86: * @todo Add some validation of recipient field, e.g. an Universal Node Locator is found -./application/hub/main/discovery/recipient/package/class_PackageRecipientDiscovery.php:87: * @todo Enrich both messages with recipient data -./application/hub/main/discovery/recipient/socket/class_PackageSocketDiscovery.php:159: // @TODO FIXME: I don't like these abuse of variables, better strict types -./application/hub/main/factories/handler/class_ProtocolHandlerFactory.php:10: * @todo Unfinished stuff -./application/hub/main/factories/socket/class_SocketFactory.php:10: * @todo Find an interface for hub helper -./application/hub/main/filter/apt-proxy/class_AptProxyInitializationFilter.php:54: * @todo 0% done -./application/hub/main/filter/apt-proxy/class_AptProxyPhpRequirementsFilter.php:55: * @todo Add more test and try to add an extra message to the thrown exception -./application/hub/main/filter/apt-proxy/class_AptProxyWelcomeTeaserFilter.php:55: * @todo Handle over the $responseInstance to outputConsoleTeaser() -./application/hub/main/filter/bootstrap/apt-proxy/class_AptProxyBootstrapGenericActivationFilter.php:54: * @todo Maybe we want to do somthing more here? -./application/hub/main/filter/bootstrap/chat/class_ChatBootstrapGenericActivationFilter.php:54: * @todo Maybe we want to do somthing more here? -./application/hub/main/filter/bootstrap/crawler/class_CrawlerBootstrapGenericActivationFilter.php:54: * @todo Maybe we want to do somthing more here? -./application/hub/main/filter/bootstrap/cruncher/class_CruncherBootstrapBufferQueueInitializerFilter.php:54: * @todo 0% done -./application/hub/main/filter/bootstrap/cruncher/class_CruncherBootstrapGenericActivationFilter.php:54: * @todo Maybe we want to do somthing more here? -./application/hub/main/filter/bootstrap/miner/class_MinerBootstrapBufferQueueInitializerFilter.php:54: * @todo 0% done -./application/hub/main/filter/bootstrap/miner/class_MinerBootstrapGenericActivationFilter.php:54: * @todo Maybe we want to do somthing more here? -./application/hub/main/filter/bootstrap/node/class_NodeBootstrapGeneratePrivateKeyFilter.php:54: * @todo 0% done -./application/hub/main/filter/chat/class_ChatInitializationFilter.php:54: * @todo 0% done -./application/hub/main/filter/chat/class_ChatPhpRequirementsFilter.php:55: * @todo Add more test and try to add an extra message to the thrown exception -./application/hub/main/filter/chat/class_ChatWelcomeTeaserFilter.php:55: * @todo Handle over the $responseInstance to outputConsoleTeaser() -./application/hub/main/filter/class_BaseHubFilter.php:56: * @todo Exceptions from renderXmlContent() are currently unhandled -./application/hub/main/filter/crawler/class_CrawlerInitializationFilter.php:54: * @todo 0% done -./application/hub/main/filter/crawler/class_CrawlerPhpRequirementsFilter.php:55: * @todo Add more test and try to add an extra message to the thrown exception -./application/hub/main/filter/crawler/class_CrawlerWelcomeTeaserFilter.php:55: * @todo Handle over the $responseInstance to outputConsoleTeaser() -./application/hub/main/filter/cruncher/class_CruncherInitializationFilter.php:54: * @todo 0% done -./application/hub/main/filter/cruncher/class_CruncherInitializationFilter.php:87: // @TODO Can we rewrite this to app_exit() ? -./application/hub/main/filter/cruncher/class_CruncherPhpRequirementsFilter.php:55: * @todo Add more test and try to add an extra message to the thrown exception -./application/hub/main/filter/cruncher/class_CruncherWelcomeTeaserFilter.php:55: * @todo Handle over the $responseInstance to outputConsoleTeaser() -./application/hub/main/filter/miner/class_MinerInitializationFilter.php:54: * @todo 0% done -./application/hub/main/filter/miner/class_MinerInitializationFilter.php:87: // @TODO Can we rewrite this to app_exit() ? -./application/hub/main/filter/miner/class_MinerPhpRequirementsFilter.php:55: * @todo Add more test and try to add an extra message to the thrown exception -./application/hub/main/filter/miner/class_MinerWelcomeTeaserFilter.php:55: * @todo Handle over the $responseInstance to outputConsoleTeaser() -./application/hub/main/filter/node/class_NodeInitializationFilter.php:62: // @TODO Can we rewrite this to app_exit() ? -./application/hub/main/filter/node/class_NodePhpRequirementsFilter.php:55: * @todo Add more test and try to add an extra message to the thrown exception -./application/hub/main/filter/node/class_NodeWelcomeTeaserFilter.php:55: * @todo Handle over the $responseInstance to outputConsoleTeaser() -./application/hub/main/filter/shutdown/node/class_NodeShutdownFlushNodeListFilter.php:55: * @todo 0% done -./application/hub/main/filter/shutdown/node/class_NodeShutdownTaskHandlerFilter.php:55: * @todo 0% done -./application/hub/main/filter/task/apt-proxy/class_AptProxyTaskHandlerInitializerFilter.php:55: * @todo 5% done -./application/hub/main/filter/task/chat/class_ChatTaskHandlerInitializerFilter.php:55: * @todo 5% done -./application/hub/main/filter/task/crawler/class_CrawlerTaskHandlerInitializerFilter.php:55: * @todo 10% done -./application/hub/main/filter/task/cruncher/class_CruncherTaskHandlerInitializerFilter.php:55: * @todo 5% done -./application/hub/main/filter/task/miner/class_MinerTaskHandlerInitializerFilter.php:55: * @todo 5% done -./application/hub/main/filter/task/node/class_NodeTaskHandlerInitializerFilter.php:55: * @todo Maybe some more tasks needs to be added? -./application/hub/main/handler/answer-status/announcement/class_AnnouncementAnswerOkayHandler.php:63: * @todo Do some more here: Handle karma, et cetera? -./application/hub/main/handler/answer-status/requests/class_RequestNodeListAnswerOkayHandler.php:103: * @todo 0% done -./application/hub/main/handler/answer-status/requests/class_RequestNodeListAnswerOkayHandler.php:115: * @todo 0% done -./application/hub/main/handler/answer-status/requests/class_RequestNodeListAnswerOkayHandler.php:63: * @todo Do some more here: Handle karma, et cetera? -./application/hub/main/handler/class_BaseHandler.php:66: * @todo Rewrite this to use DHT -./application/hub/main/handler/message-types/answer/class_NodeMessageDhtBootstrapAnswerHandler.php:90: * @todo ~30% done -./application/hub/main/handler/message-types/self-connect/class_NodeMessageSelfConnectHandler.php:71: // @TODO Throw an exception here instead of dying -./application/hub/main/handler/network/class_BaseRawDataHandler.php:148: * @todo This method will be moved to a better place -./application/hub/main/handler/network/udp/class_UdpRawDataHandler.php:58: * @todo 0% -./application/hub/main/handler/protocol/class_BaseProtocolHandler.php:110: * @TODO If you know why, please fix and explain it to me. -./application/hub/main/handler/tasks/class_TaskHandler.php:139: // @TODO Messurement can be added around this call -./application/hub/main/helper/class_BaseHubSystemHelper.php:87: * @todo 0% done -./application/hub/main/helper/connection/ipv4/class_BaseIpV4ConnectionHelper.php:105: * @todo Rewrite the while() loop to a iterator to not let the software stay very long here -./application/hub/main/helper/connection/ipv4/class_BaseIpV4ConnectionHelper.php:10: * @todo Find an interface for hub helper -./application/hub/main/helper/connection/ipv4/class_BaseIpV4ConnectionHelper.php:77: // @TODO Move this to the socket error handler -./application/hub/main/helper/connection/ipv4/tcp/class_TcpConnectionHelper.php:10: * @todo Find an interface for hub helper -./application/hub/main/helper/connection/ipv4/tcp/class_TcpConnectionHelper.php:118: // @TODO Rewrite this test for UNLs -./application/hub/main/helper/connection/ipv4/tcp/class_TcpConnectionHelper.php:125: // @TODO Rewrite this test for UNLs -./application/hub/main/helper/connection/ipv4/tcp/class_TcpConnectionHelper.php:155: * @todo We may want to implement a filter for ease notification of other objects like our pool -./application/hub/main/helper/connection/ipv4/tcp/class_TcpConnectionHelper.php:49: * @todo $errorCode/-Message are now in handleSocketError()'s call-back methods -./application/hub/main/helper/connection/ipv4/tcp/class_TcpConnectionHelper.php:89: // @TODO The whole resolving part should be moved out and made more configurable -./application/hub/main/helper/connection/ipv4/udp/class_UdpConnectionHelper.php:10: * @todo Find an interface for hub helper -./application/hub/main/helper/connection/ipv4/udp/class_UdpConnectionHelper.php:56: * @todo Implement a filter for ease notification of other objects like the pool -./application/hub/main/helper/dht/class_DhtBootstrapHelper.php:10: * @todo Find an interface for hub helper -./application/hub/main/helper/dht/class_DhtPublishEntryHelper.php:10: * @todo Find an interface for hub helper -./application/hub/main/helper/node/announcement/class_NodeAnnouncementHelper.php:10: * @todo Find an interface for hub helper -./application/hub/main/helper/node/answer/announcement/class_NodeAnnouncementMessageAnswerHelper.php:10: * @todo Find an interface for hub helper -./application/hub/main/helper/node/answer/dht/class_NodeDhtBootstrapMessageAnswerHelper.php:10: * @todo Find an interface for hub helper -./application/hub/main/helper/node/answer/requests/class_NodeRequestNodeListMessageAnswerHelper.php:10: * @todo Find an interface for hub helper -./application/hub/main/helper/node/connection/class_NodeSelfConnectHelper.php:10: * @todo Find an interface for hub helper -./application/hub/main/helper/node/requests/class_NodeRequestNodeListHelper.php:10: * @todo Find an interface for hub helper -./application/hub/main/helper/work_units/cruncher/class_CruncherTestUnitHelper.php:53: * @todo 0% done -./application/hub/main/helper/work_units/cruncher/class_CruncherTestUnitHelper.php:64: * @todo 0% done -./application/hub/main/iterator/network/class_NetworkListenIterator.php:10: * @todo This current implementation is not recommended, use a -./application/hub/main/iterator/network/class_NetworkListenIterator.php:11: * @todo latency-based iteration or similar approaches -./application/hub/main/iterator/pool/handler/class_HandlerPoolIterator.php:10: * @todo This current implementation is not recommended, use a -./application/hub/main/iterator/pool/handler/class_HandlerPoolIterator.php:11: * @todo latency-based iteration or similar approaches -./application/hub/main/iterator/pool/monitor/class_MonitorPoolIterator.php:10: * @todo This current implementation is not recommended, use a -./application/hub/main/iterator/pool/monitor/class_MonitorPoolIterator.php:11: * @todo latency-based iteration or similar approaches -./application/hub/main/iterator/pool/tasks/class_TaskPoolIterator.php:10: * @todo This current implementation is not recommended, use a -./application/hub/main/iterator/pool/tasks/class_TaskPoolIterator.php:11: * @todo latency-based iteration or similar approaches -./application/hub/main/listener/tcp/class_TcpListener.php:252: // @TODO Does this work on Windozer boxes??? -./application/hub/main/listener/udp/class_UdpListener.php:153: * @todo ~50% done -./application/hub/main/lists/class_BaseList.php:305: // @TODO Extend this somehow? -./application/hub/main/lists/groups/class_ListGroupList.php:61: * @todo 0% done -./application/hub/main/miner/chash/class_HubChashMiner.php:108: * @todo Implement this method -./application/hub/main/miner/chash/class_HubChashMiner.php:138: * @todo 0% done -./application/hub/main/miner/chash/class_HubChashMiner.php:98: // @TODO Implement this method -./application/hub/main/miner/class_BaseHubMiner.php:200: * @todo Try to make this method more generic so we can move it in BaseFrameworkSystem -./application/hub/main/nodes/boot/class_HubBootNode.php:116: // @TODO Add some filters here -./application/hub/main/nodes/boot/class_HubBootNode.php:58: * @todo add some more special bootstrap things for this boot node -./application/hub/main/nodes/class_BaseHubNode.php:131: * @todo Make this code more generic and move it to CryptoHelper or -./application/hub/main/nodes/class_BaseHubNode.php:392: * @todo Try to make this method more generic so we can move it in BaseFrameworkSystem -./application/hub/main/nodes/class_BaseHubNode.php:432: * @todo Change the first if() block to check for a specific state -./application/hub/main/nodes/class_BaseHubNode.php:638: * @todo Add checking if this node has been announced to the sender node -./application/hub/main/nodes/class_BaseHubNode.php:658: * @todo Add checking if this node has been announced to the sender node -./application/hub/main/nodes/class_BaseHubNode.php:763: * @todo Find more to do here -./application/hub/main/nodes/class_BaseHubNode.php:776: * @todo Handle thrown exception -./application/hub/main/nodes/list/class_HubListNode.php:58: * @todo Implement more bootstrap steps -./application/hub/main/nodes/list/class_HubListNode.php:79: // @TODO Add some filters here -./application/hub/main/nodes/list/class_HubListNode.php:88: * @todo 0% done -./application/hub/main/nodes/master/class_HubMasterNode.php:58: * @todo Implement this method -./application/hub/main/nodes/master/class_HubMasterNode.php:83: // @TODO Add some filters here -./application/hub/main/nodes/master/class_HubMasterNode.php:92: * @todo 0% done -./application/hub/main/nodes/regular/class_HubRegularNode.php:58: * @todo Implement this method -./application/hub/main/nodes/regular/class_HubRegularNode.php:79: // @TODO Add some filters here -./application/hub/main/nodes/regular/class_HubRegularNode.php:88: * @todo 0% done -./application/hub/main/package/class_NetworkPackage.php:1167: * @todo This may be enchanced for outgoing packages? -./application/hub/main/package/class_NetworkPackage.php:1198: * @todo Unsupported feature of "signed" messages commented out -./application/hub/main/package/class_NetworkPackage.php:1287: * @todo Implement verification of all sent tags here? -./application/hub/main/package/class_NetworkPackage.php:23: * @todo Needs to add functionality for handling the object's type -./application/hub/main/package/class_NetworkPackage.php:338: // @TODO md5() is very weak, but it needs to be fast -./application/hub/main/package/class_NetworkPackage.php:412: // @TODO md5() is very weak, but it needs to be fast -./application/hub/main/package/class_NetworkPackage.php:595: // @TODO We may want to do somthing more here? -./application/hub/main/package/class_NetworkPackage.php:630: * @todo Unfinished area, signatures are currently NOT fully supported -./application/hub/main/package/fragmenter/class_PackageFragmenter.php:275: * @todo Implement a way to send non-announcement packages with extra-salt -./application/hub/main/package/fragmenter/class_PackageFragmenter.php:370: // @TODO This assert broke packages where the hash chunk was very large: assert(strlen($rawData) <= NetworkPackage::TCP_PACKAGE_SIZE); -./application/hub/main/package/fragmenter/class_PackageFragmenter.php:441: * @todo $helperInstance is unused -./application/hub/main/producer/cruncher/keys/class_CruncherKeyProducer.php:106: // @TODO Send the produced key bundle to the unit producer's input queue -./application/hub/main/producer/cruncher/keys/class_CruncherKeyProducer.php:62: * @todo Find something for init phase of this key producer -./application/hub/main/producer/cruncher/keys/class_CruncherKeyProducer.php:72: * @todo ~30% done -./application/hub/main/producer/cruncher/work_units/class_CruncherTestUnitProducer.php:79: * @todo ~60% done -./application/hub/main/producer/cruncher/work_units/class_CruncherTestUnitProducer.php:88: // @TODO Unfinished work here -./application/hub/main/producer/miner/blocks/class_MinerTestGenesisBlockProducer.php:59: * @todo ~10% done -./application/hub/main/producer/miner/blocks/class_MinerTestGenesisBlockProducer.php:75: * @todo 0% done -./application/hub/main/producer/miner/blocks/class_MinerTestGenesisBlockProducer.php:86: * @todo ~5% done -./application/hub/main/recipient/dht/class_DhtRecipient.php:76: // @TODO Unfinished -./application/hub/main/recipient/self/class_SelfRecipient.php:61: // @TODO Add more checks on data -./application/hub/main/resolver/protocol/tcp/class_TcpProtocolResolver.php:57: * @todo 0% done -./application/hub/main/resolver/state/peer/class_PeerStateResolver.php:59: * @todo ~30% done -./application/hub/main/scanner/crawler/uploaded_list/class_CrawlerUploadedListScanner.php:52: * @todo 0% done -./application/hub/main/source/urls/class_CrawlerFoundRssUrlSource.php:55: * @todo 0% done -./application/hub/main/source/urls/class_CrawlerLocalStartUrlSource.php:55: * @todo 0% done -./application/hub/main/source/urls/class_CrawlerRssStartUrlSource.php:55: * @todo 0% done -./application/hub/main/source/urls/class_CrawlerUploadedListUrlSource.php:327: * @todo ~40% done -./application/hub/main/states/communicator/init/class_CommunicatorInitState.php:60: * @todo 0% done? -./application/hub/main/states/crawler/active/class_CrawlerActiveState.php:60: * @todo 0% done -./application/hub/main/states/crawler/booting/class_CrawlerBootingState.php:60: * @todo 0% done -./application/hub/main/states/crawler/init/class_CrawlerInitState.php:70: * @todo ~30% done -./application/hub/main/states/dht/class_BaseDhtState.php:10: * @todo Create generic DHT interface -./application/hub/main/states/miner/init/class_MinerInitState.php:60: * @todo 0% done? -./application/hub/main/states/node/active/class_NodeActiveState.php:75: * @todo We might want to move some calls to this method to fill it with life -./application/hub/main/states/node/init/class_NodeInitState.php:60: * @todo We might want to move some calls to this method to fill it with life -./application/hub/main/statistics/connection/class_ConnectionStatisticsHelper.php:11: * @todo Find an interface for hub helper -./application/hub/main/statistics/connection/class_ConnectionStatisticsHelper.php:29: * @TODO Add more protocols to use -./application/hub/main/statistics/connection/class_ConnectionStatisticsHelper.php:99: // @TODO last_update is not being used at the moment -./application/hub/main/streams/raw_data/input/class_RawDataInputStream.php:58: * @todo Do we need to do something more here? -./application/hub/main/tasks/apt-proxy/class_AptProxyListenerTask.php:63: * @todo 0% -./application/hub/main/tasks/chat/class_ChatTelnetListenerTask.php:63: * @todo 0% -./application/hub/main/tasks/crawler/communicator/class_CrawlerNodeCommunicatorTask.php:53: * @todo Maybe visit some sub-objects -./application/hub/main/tasks/crawler/document_parser/class_CrawlerDocumentParserTask.php:53: * @todo Maybe visit some sub-objects -./application/hub/main/tasks/crawler/document_parser/class_CrawlerDocumentParserTask.php:64: * @todo 0% -./application/hub/main/tasks/crawler/mime_sniffer/class_CrawlerMimeSnifferTask.php:53: * @todo Maybe visit some sub-objects -./application/hub/main/tasks/crawler/mime_sniffer/class_CrawlerMimeSnifferTask.php:64: * @todo 0% -./application/hub/main/tasks/crawler/ping/class_CrawlerPingTask.php:53: * @todo Maybe visit some sub-objects -./application/hub/main/tasks/crawler/ping/class_CrawlerPingTask.php:64: * @todo 0% -./application/hub/main/tasks/crawler/publisher/class_CrawlerRemoteJobPublisherTask.php:53: * @todo Maybe visit some sub-objects -./application/hub/main/tasks/crawler/publisher/class_CrawlerRemoteJobPublisherTask.php:64: * @todo 0% -./application/hub/main/tasks/crawler/scanner/class_CrawlerUploadedListScannerTask.php:53: * @todo Maybe visit some sub-objects -./application/hub/main/tasks/crawler/snippet_extractor/class_CrawlerSnippetExtractorTask.php:53: * @todo Maybe visit some sub-objects -./application/hub/main/tasks/crawler/snippet_extractor/class_CrawlerSnippetExtractorTask.php:64: * @todo 0% -./application/hub/main/tasks/crawler/structure_analyzer/class_CrawlerStructureAnalyzerTask.php:53: * @todo Maybe visit some sub-objects -./application/hub/main/tasks/crawler/structure_analyzer/class_CrawlerStructureAnalyzerTask.php:64: * @todo 0% -./application/hub/main/tasks/crawler/url_crawler/local/class_CrawlerLocalUrlCrawlerTask.php:53: * @todo Maybe visit some sub-objects -./application/hub/main/tasks/crawler/url_crawler/local/class_CrawlerLocalUrlCrawlerTask.php:64: * @todo 0% -./application/hub/main/tasks/crawler/url_crawler/remote/class_CrawlerRemoteUrlCrawlerTask.php:53: * @todo Maybe visit some sub-objects -./application/hub/main/tasks/crawler/url_crawler/remote/class_CrawlerRemoteUrlCrawlerTask.php:64: * @todo 0% -./application/hub/main/tasks/crawler/url_source/class_CrawlerUrlSourceFoundRssTask.php:53: * @todo Maybe visit some sub-objects -./application/hub/main/tasks/crawler/url_source/class_CrawlerUrlSourceLocalStartTask.php:53: * @todo Maybe visit some sub-objects -./application/hub/main/tasks/crawler/url_source/class_CrawlerUrlSourceRssStartTask.php:53: * @todo Maybe visit some sub-objects -./application/hub/main/tasks/crawler/url_source/class_CrawlerUrlSourceUploadedListTask.php:53: * @todo Maybe visit some sub-objects -./application/hub/main/tasks/miner/communicator/class_MinerNodeCommunicatorTask.php:53: * @todo Maybe visit some sub-objects -./application/hub/main/tasks/network/class_NetworkPackageReaderTask.php:63: * @todo Also visit some sub-objects? -./application/hub/main/tasks/network/class_NetworkPackageWriterTask.php:59: * @todo Also visit some sub-objects? -./application/hub/main/tasks/node/chunks/class_NodeChunkAssemblerTask.php:59: * @todo Also visit some sub-objects? -./application/hub/main/tasks/node/dht/class_NodeDhtPublicationCheckTask.php:69: * @todo Add more? -./application/hub/main/tasks/node/dht/class_NodeDhtPublicationTask.php:69: * @todo Add more? -./application/hub/main/tasks/node/dht/class_NodeDhtQueryTask.php:69: * @todo ~5% done -./application/hub/main/tasks/node/listener/class_NodeSocketListenerTask.php:63: // @TODO Do we need to visit this task? $visitorInstance->visitTask($this); -./application/hub/main/tasks/node/listener/class_NodeSocketListenerTask.php:70: * @todo 0% done -./application/hub/main/tasks/node/ping/class_NodePingTask.php:63: * @todo Also visit some sub-objects? -./application/hub/main/tasks/node/ping/class_NodePingTask.php:74: * @todo 0% done -./application/hub/main/tasks/node/tags/class_NodePackageTagsInitTask.php:53: * @todo Maybe visit some sub-objects -./application/hub/main/tasks/node/update/class_NodeUpdateCheckTask.php:53: * @todo 0% -./application/hub/main/template/announcement/class_XmlAnnouncementTemplateEngine.php:10: * @todo This template engine does not make use of setTemplateType() -./application/hub/main/template/answer/announcement/class_XmlAnnouncementAnswerTemplateEngine.php:10: * @todo This template engine does not make use of setTemplateType() -./application/hub/main/template/answer/announcement/class_XmlAnnouncementAnswerTemplateEngine.php:90: * @todo Find something useful with this! -./application/hub/main/template/answer/class_BaseXmlAnswerTemplateEngine.php:10: * @todo This template engine does not make use of setTemplateType() -./application/hub/main/template/answer/dht/class_XmlDhtBootstrapAnswerTemplateEngine.php:10: * @todo This template engine does not make use of setTemplateType() -./application/hub/main/template/answer/dht/class_XmlDhtBootstrapAnswerTemplateEngine.php:93: * @todo Find something useful with this! -./application/hub/main/template/answer/requests/class_XmlRequestNodeListAnswerTemplateEngine.php:10: * @todo This template engine does not make use of setTemplateType() -./application/hub/main/template/answer/requests/class_XmlRequestNodeListAnswerTemplateEngine.php:82: * @todo Find something useful with this! -./application/hub/main/template/class_BaseXmlTemplateEngine.php:10: * @todo This template engine does not make use of setTemplateType() -./application/hub/main/template/connect/class_XmlSelfConnectTemplateEngine.php:10: * @todo This template engine does not make use of setTemplateType() -./application/hub/main/template/connect/class_XmlSelfConnectTemplateEngine.php:77: * @todo Find something useful with this! -./application/hub/main/template/dht/class_XmlDhtBootstrapTemplateEngine.php:10: * @todo This template engine does not make use of setTemplateType() -./application/hub/main/template/entries/class_XmlRequestNodeListEntryTemplateEngine.php:10: * @todo This template engine does not make use of setTemplateType() -./application/hub/main/template/entries/class_XmlRequestNodeListEntryTemplateEngine.php:64: * @todo Find something useful with this! -./application/hub/main/template/objects/class_XmlObjectRegistryTemplateEngine.php:10: * @todo This template engine does not make use of setTemplateType() -./application/hub/main/template/objects/class_XmlObjectRegistryTemplateEngine.php:139: * @todo Handle $objectCount -./application/hub/main/template/objects/class_XmlObjectRegistryTemplateEngine.php:90: * @todo Find something useful with this! -./application/hub/main/template/producer/test_units/class_XmlCruncherTestUnitTemplateEngine.php:10: * @todo This template engine does not make use of setTemplateType() -./application/hub/main/template/producer/test_units/class_XmlCruncherTestUnitTemplateEngine.php:270: * @todo Handle $keyCount -./application/hub/main/template/publish/class_XmlDhtPublishEntryTemplateEngine.php:10: * @todo This template engine does not make use of setTemplateType() -./application/hub/main/template/requests/class_XmlRequestNodeListTemplateEngine.php:10: * @todo This template engine does not make use of setTemplateType() -./application/hub/main/template/requests/class_XmlRequestNodeListTemplateEngine.php:74: * @todo Find something useful with this! -./application/hub/main/tools/class_HubTools.php:158: // @TODO ((25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9])\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[0-9])):([0-9]{3,5}) -./application/hub/main/tools/class_HubTools.php:263: // @TODO Find a better validation than empty() -./application/hub/main/tools/class_HubTools.php:291: // @TODO Find a better validation than empty() -./application/hub/main/wrapper/node/class_NodeDistributedHashTableDatabaseWrapper.php:163: // @TODO Bad check on UNL, better use a proper validator -./application/hub/main/wrapper/node/class_NodeDistributedHashTableDatabaseWrapper.php:209: // @TODO Bad check on UNL, better use a proper validator -./application/hub/main/wrapper/node/class_NodeDistributedHashTableDatabaseWrapper.php:442: // @TODO Unimplemented part -./application/hub/main/wrapper/node/class_NodeDistributedHashTableDatabaseWrapper.php:509: * @todo Add minimum/maximum age limitations -./application/hub/main/wrapper/node/class_NodeDistributedHashTableDatabaseWrapper.php:540: * @todo Add timestamp to dataset instance -./application/hub/main/wrapper/states/class_PeerStateLookupDatabaseWrapper.php:174: * @todo Unfinished area -./application/hub/main/wrapper/states/class_PeerStateLookupDatabaseWrapper.php:216: * @todo Unfinished area -./core/inc/classes.php:10: * @todo Minimize these includes -./core/inc/classes/exceptions/main/class_MissingMethodException.php:13: * @todo Try to rewrite user/guest login classes and mark this exception as deprecated -./core/inc/classes/exceptions/main/class_NoConfigEntryException.php:10: * @todo Rename this class to NoFoundEntryException -./core/inc/classes/interfaces/class_FrameworkInterface.php:11: * @todo Find a better name for this interface -./core/inc/classes/interfaces/criteria/extended/class_LocalSearchCriteria.php:30: * @todo Find a nice casting here. (int) allows until and including 32766. -./core/inc/classes/interfaces/criteria/extended/class_LocalSearchCriteria.php:54: * @todo Find a nice casting here. (int) allows until and including 32766. -./core/inc/classes/main/class_BaseFrameworkSystem.php:1977: * @todo Write a logging mechanism for productive mode -./core/inc/classes/main/class_BaseFrameworkSystem.php:1992: // @TODO Finish this part! -./core/inc/classes/main/class_BaseFrameworkSystem.php:250: // @todo Try to clean these constants up -./core/inc/classes/main/class_BaseFrameworkSystem.php:475: // @TODO __CLASS__ does always return BaseFrameworkSystem but not the extending (=child) class -./core/inc/classes/main/class_BaseFrameworkSystem.php:549: * @todo SearchableResult and UpdateableResult shall have a super interface to use here -./core/inc/classes/main/commands/web/class_WebLoginAreaCommand.php:64: * @todo Add some stuff here: Some personal data, app/game related data -./core/inc/classes/main/commands/web/class_WebProblemCommand.php:58: * @todo 0% done -./core/inc/classes/main/commands/web/class_WebStatusCommand.php:58: * @todo 0% done -./core/inc/classes/main/console/class_ConsoleTools.php:268: * @todo This should be moved out to an external class, e.g. HttpClient -./core/inc/classes/main/console/class_ConsoleTools.php:269: * @todo Make IP, host name, port and script name configurable -./core/inc/classes/main/console/class_ConsoleTools.php:276: // @TODO Add some DNS caching here -./core/inc/classes/main/console/class_ConsoleTools.php:45: * @todo We should connect this to a caching class to cache DNS requests -./core/inc/classes/main/console/class_ConsoleTools.php:58: // @TODO Here should the cacher be implemented -./core/inc/classes/main/controller/console/class_ConsoleDefaultController.php:10: * @todo This controller shall still provide some headlines for sidebars -./core/inc/classes/main/controller/login/class_WebLoginAreaController.php:40: * @todo Add some morer filters to this controller -./core/inc/classes/main/controller/web/class_WebConfirmController.php:40: * @todo Add some filters to this controller -./core/inc/classes/main/controller/web/class_WebDefaultController.php:10: * @todo This controller shall still provide some headlines for sidebars -./core/inc/classes/main/controller/web/class_WebLoginController.php:41: * @todo Add some filters to this controller -./core/inc/classes/main/controller/web/class_WebLogoutController.php:10: * @todo This controller shall still provide some headlines for sidebars -./core/inc/classes/main/controller/web/class_WebLogoutDoneController.php:40: * @todo Add some filters to this controller -./core/inc/classes/main/controller/web/class_WebProblemController.php:40: * @todo Add some filters to this controller -./core/inc/classes/main/controller/web/class_WebRegisterController.php:40: * @todo Add some filters to this controller -./core/inc/classes/main/controller/web/class_WebStatusController.php:10: * @todo This controller shall still provide some headlines for sidebars -./core/inc/classes/main/criteria/search/class_SearchCriteria.php:102: * @todo Find a nice casting here. (int) allows until and including 32766. -./core/inc/classes/main/criteria/search/class_SearchCriteria.php:70: * @todo Find a nice casting here. (int) allows until and including 32766. -./core/inc/classes/main/database/backend/class_CachedLocalFileDatabase.php:327: * @todo Do some checks on the database directory and files here -./core/inc/classes/main/database/backend/class_CachedLocalFileDatabase.php:616: * @todo Add more generic non-public data for removal -./core/inc/classes/main/decorator/template/class_XmlRewriterTemplateDecorator.php:427: * @todo Find something useful with this! -./core/inc/classes/main/discovery/payment/class_LocalPaymentDiscovery.php:85: * @todo 0% done -./core/inc/classes/main/file_directories/class_BaseFile.php:135: * @todo ~10% done? -./core/inc/classes/main/file_directories/class_BaseFile.php:148: * @todo Handle seekStatus -./core/inc/classes/main/file_directories/class_BaseFileIo.php:162: * @todo Handle seekStatus -./core/inc/classes/main/file_directories/directory/class_FrameworkDirectoryPointer.php:68: * @todo Get rid of inConstructor, could be old-lost code. -./core/inc/classes/main/file_directories/io_stream/class_FileIoStream.php:270: * @todo 0% done -./core/inc/classes/main/file_directories/io_stream/class_FileIoStream.php:74: * @todo This method needs heavy rewrite -./core/inc/classes/main/filter/change/class_EmailChangeFilter.php:55: * @todo Implement email change of the user here. HINT: Use the User class! -./core/inc/classes/main/filter/change/class_PasswordChangeFilter.php:55: * @todo Finished updating user password hash here. HINT: Use the User class again. -./core/inc/classes/main/filter/news/class_NewsProcessFilter.php:55: * @todo Unfinished stub, add functionality here -./core/inc/classes/main/filter/payment/class_PaymentDiscoveryFilter.php:97: * @todo 0% done -./core/inc/classes/main/filter/update/class_UserUpdateFilter.php:55: * @todo Add more user updates here -./core/inc/classes/main/filter/verifier/class_AccountPasswordVerifierFilter.php:57: * @todo Rewrite handling of different password fields -./core/inc/classes/main/helper/class_BaseHelper.php:173: * @todo Rewrite this method using a helper class for filtering data -./core/inc/classes/main/helper/class_BaseHelper.php:202: // @TODO Try to log it here -./core/inc/classes/main/helper/web/forms/class_WebFormHelper.php:102: * @todo Add some unique PIN here to bypass problems with some browser and/or extensions -./core/inc/classes/main/helper/web/forms/class_WebFormHelper.php:621: * @todo Add checking if sub option is already added -./core/inc/classes/main/helper/web/forms/class_WebFormHelper.php:649: * @todo Add checking if sub option is already added -./core/inc/classes/main/helper/web/forms/class_WebFormHelper.php:683: // @TODO We need to log this later -./core/inc/classes/main/helper/web/forms/class_WebFormHelper.php:852: * @todo Implement check if rules have been changed -./core/inc/classes/main/helper/web/links/class_WebLinkHelper.php:184: * @todo Completely unimplemented -./core/inc/classes/main/images/class_BaseImage.php:156: * @todo Find something usefull for this method. -./core/inc/classes/main/images/class_BaseImage.php:166: * @todo Find something usefull for this method. -./core/inc/classes/main/images/class_BaseImage.php:176: * @todo Find something usefull for this method. -./core/inc/classes/main/images/class_BaseImage.php:186: * @todo Find something usefull for this method. -./core/inc/classes/main/images/class_BaseImage.php:196: * @todo Find something usefull for this method. -./core/inc/classes/main/images/class_BaseImage.php:215: * @todo Find something usefull for this method. -./core/inc/classes/main/images/class_BaseImage.php:234: * @todo Find something usefull for this method. -./core/inc/classes/main/images/class_BaseImage.php:245: * @todo Find something usefull for this method. -./core/inc/classes/main/images/class_BaseImage.php:255: * @todo Find something usefull for this method. -./core/inc/classes/main/index/class_BaseIndex.php:135: * @todo Currently the index file is not cached, please implement a memory-handling class and if enough RAM is found, cache the whole index file. -./core/inc/classes/main/mailer/class_BaseMailer.php:55: // @TODO This needs testing/fixes because the deprecated method -./core/inc/classes/main/mailer/debug/class_DebugMailer.php:124: * @todo 0% done -./core/inc/classes/main/menu/class_BaseMenu.php:59: // @TODO Should we log it here? We should, because it will be silently ignored. -./core/inc/classes/main/output/class_ConsoleOutput.php:56: // @TODO Need to rewrite this to $requestInstance->addHeader() -./core/inc/classes/main/parser/xml/class_XmlParser.php:79: // @TODO We need to find a fallback solution here -./core/inc/classes/main/points/class_UserPoints.php:100: * @todo Finish loading part of points -./core/inc/classes/main/request/console/class_ConsoleRequest.php:106: // @TODO Can't this be 'CONSOLE' ? -./core/inc/classes/main/request/web/class_HttpRequest.php:10: * @todo Move out the cookie part to a seperate class, e.g. Cookie -./core/inc/classes/main/response/http/class_HttpResponse.php:77: * @todo Encryption of cookie data not yet supported. -./core/inc/classes/main/response/http/class_HttpResponse.php:78: * @todo Why are these parameters conflicting? -./core/inc/classes/main/response/http/class_HttpResponse.php:79: * @todo If the return statement is removed and setcookie() commented out, -./core/inc/classes/main/response/http/class_HttpResponse.php:80: * @todo this will send only one cookie out, the first one. -./core/inc/classes/main/response/image/class_ImageResponse.php:88: * @todo Encryption of cookie data not yet supported. -./core/inc/classes/main/response/image/class_ImageResponse.php:89: * @todo Why are these parameters conflicting? -./core/inc/classes/main/response/image/class_ImageResponse.php:90: * @todo If the return statement is removed and setcookie() commented out, -./core/inc/classes/main/response/image/class_ImageResponse.php:91: * @todo this will send only one cookie out, the first one. -./core/inc/classes/main/result/class_DatabaseResult.php:244: * @todo 0% done -./core/inc/classes/main/result/class_DatabaseResult.php:398: * @todo Find a caching way without modifying the result array -./core/inc/classes/main/rng/class_RandomNumberGenerator.php:175: * @todo I had a better random number generator here but now it is somewhere lost :( -./core/inc/classes/main/rng/class_RandomNumberGenerator.php:97: * @todo Add site key for stronger salt! -./core/inc/classes/main/stacker/file/class_BaseFileStack.php:147: * @todo Currently the stack file is not cached, please implement a memory-handling class and if enough RAM is found, cache the whole stack file. -./core/inc/classes/main/stacker/file/class_BaseFileStack.php:309: // @TODO Please implement this, returning FALSE -./core/inc/classes/main/stacker/file/class_BaseFileStack.php:45: * @todo To hard assertions here, better rewrite them to exceptions -./core/inc/classes/main/template/class_BaseTemplateEngine.php:1070: // @TODO This silent abort should be logged, maybe. -./core/inc/classes/main/template/class_BaseTemplateEngine.php:1078: // @TODO Old behaviour, will become obsolete! -./core/inc/classes/main/template/class_BaseTemplateEngine.php:1081: // @TODO Yet another old way -./core/inc/classes/main/template/class_BaseTemplateEngine.php:1289: * @todo Make this code some nicer... -./core/inc/classes/main/template/class_BaseTemplateEngine.php:967: * @todo Unfinished work or don't die here. -./core/inc/classes/main/template/class_BaseTemplateEngine.php:992: // @TODO Non-string found so we need some deeper analysis... -./core/inc/classes/main/template/console/class_ConsoleTemplateEngine.php:10: * @todo This template engine does not make use of setTemplateType() -./core/inc/classes/main/template/image/class_ImageTemplateEngine.php:215: * @todo Find something usefull with this! -./core/inc/classes/main/template/image/class_ImageTemplateEngine.php:235: * @todo Add cache creation here -./core/inc/classes/main/template/mail/class_MailTemplateEngine.php:10: * @todo This template engine does not make use of setTemplateType() -./core/inc/classes/main/template/mail/class_MailTemplateEngine.php:228: * @todo Add cache creation here -./core/inc/classes/main/template/mail/class_MailTemplateEngine.php:238: * @todo Should we call back the mailer class here? -./core/inc/classes/main/template/mail/class_MailTemplateEngine.php:319: * @todo 0% done -./core/inc/classes/main/template/menu/class_MenuTemplateEngine.php:267: * @todo Find something useful with this! -./core/inc/classes/main/template/menu/class_MenuTemplateEngine.php:313: * @todo Add cache creation here -./core/inc/classes/main/user/class_BaseUser.php:308: * @todo Try to make this method more generic so we can move it in BaseFrameworkSystem -./core/inc/classes/main/user/class_BaseUser.php:80: * @todo Find a way of casting here. "(int)" might destroy the user id > 32766 -./core/inc/classes/main/user/member/class_Member.php:84: * @todo Add more ways over creating user classes -./core/inc/classes/middleware/compressor/class_CompressorChannel.php:103: // @TODO Is there a configurable fall-back compressor needed, or is NullCompressor okay? -./core/inc/classes/middleware/debug/class_DebugMiddleware.php:113: // @TODO Initialization phase -./core/inc/classes/middleware/io/class_FileIoHandler.php:174: * @todo 0% done -./core/inc/classes/third_party/api/wernisportal/class_WernisApi.php:10: * @todo Out-dated since 0.6-BETA -./core/inc/config/class_FrameworkConfiguration.php:115: * @todo This method encapsulates a deprecated PHP function and should be deprecated, too. -./core/inc/config/class_FrameworkConfiguration.php:223: * @todo We have to add some more entries from $_SERVER here -./core/inc/database.php:11: * @todo Minimize these includes -./core/inc/database.php:51:// @TODO Rewrite this -./core/inc/includes.php:11: * @todo Minimize these includes -./core/inc/includes.php:37:// @TODO This makes the core depending on the SPL. But it should be installed anyway. -./core/inc/includes.php:41:// @TODO Find a nicer OOP-ed way for this -./core/inc/loader/class_ClassLoader.php:319: /* @TODO: Do not exit here. */ -./core/inc/output.php:11: * @todo Minimize these includes -./core/inc/selector.php:11: * @todo Minimize these includes -./core/index.php:43: * @todo This method is old code and needs heavy rewrite and should be moved to ApplicationHelper -./index.php:43: * @todo This method is old code and needs heavy rewrite and should be moved to ApplicationHelper +./application/hub/class_ApplicationHelper.php:264: * @todo Nothing to add? +./application/hub/classes/chains/class_PackageFilterChain.php:60: * @todo This may be slow if a message with a lot tags arrived +./application/hub/classes/class_BaseHubSystem.php:145: * @todo Move all this socket-related stuff into own class, most of it resides in BaseListener +./application/hub/classes/commands/console/class_HubConsoleAptProxyCommand.php:120: * @todo Should we add some more filters? +./application/hub/classes/commands/console/class_HubConsoleAptProxyCommand.php:71: * @todo Try to create a AptProxyActivationTask or so +./application/hub/classes/commands/console/class_HubConsoleChatCommand.php:120: * @todo Should we add some more filters? +./application/hub/classes/commands/console/class_HubConsoleChatCommand.php:71: * @todo Try to create a ChatActivationTask or so +./application/hub/classes/commands/console/class_HubConsoleCrawlerCommand.php:120: * @todo Should we add some more filters? +./application/hub/classes/commands/console/class_HubConsoleCrawlerCommand.php:71: * @todo Try to create a CrawlerActivationTask or so +./application/hub/classes/commands/console/class_HubConsoleCruncherCommand.php:120: * @todo Should we add some more filters? +./application/hub/classes/commands/console/class_HubConsoleCruncherCommand.php:71: * @todo Try to create a CruncherActivationTask or so +./application/hub/classes/commands/console/class_HubConsoleMainCommand.php:130: * @todo Should we add some more filters? +./application/hub/classes/commands/console/class_HubConsoleMainCommand.php:74: * @todo Try to create a HubActivationTask or so +./application/hub/classes/commands/console/class_HubConsoleMinerCommand.php:120: * @todo Should we add some more filters? +./application/hub/classes/commands/console/class_HubConsoleMinerCommand.php:71: * @todo Try to create a MinerActivationTask or so +./application/hub/classes/commands/html/class_HubHtmlIndexCommand.php:94: * @todo 0% done +./application/hub/classes/crawler/class_BaseNodeCrawler.php:72: * @todo 0% done +./application/hub/classes/cruncher/class_BaseHubCruncher.php:215: * @todo Try to make this method more generic so we can move it in BaseFrameworkSystem +./application/hub/classes/cruncher/mcrypt/class_HubMcryptCruncher.php:107: // @TODO Implement this method +./application/hub/classes/cruncher/mcrypt/class_HubMcryptCruncher.php:117: * @todo Implement this method +./application/hub/classes/cruncher/mcrypt/class_HubMcryptCruncher.php:147: * @todo 0% done +./application/hub/classes/database/frontend/node/class_NodeDistributedHashTableDatabaseWrapper.php:181: // @TODO Bad check on UNL, better use a proper validator +./application/hub/classes/database/frontend/node/class_NodeDistributedHashTableDatabaseWrapper.php:227: // @TODO Bad check on UNL, better use a proper validator +./application/hub/classes/database/frontend/node/class_NodeDistributedHashTableDatabaseWrapper.php:460: // @TODO Unimplemented part +./application/hub/classes/database/frontend/node/class_NodeDistributedHashTableDatabaseWrapper.php:527: * @todo Add minimum/maximum age limitations +./application/hub/classes/database/frontend/node/class_NodeDistributedHashTableDatabaseWrapper.php:558: * @todo Add timestamp to dataset instance +./application/hub/classes/database/frontend/states/class_PeerStateLookupDatabaseWrapper.php:188: * @todo Unfinished area +./application/hub/classes/database/frontend/states/class_PeerStateLookupDatabaseWrapper.php:230: * @todo Unfinished area, please rewrite! +./application/hub/classes/dht/class_BaseDht.php:135: * @todo Add minimum/maximum age limitations +./application/hub/classes/dht/class_BaseDht.php:169: // @TODO Maybe add more small checks? +./application/hub/classes/dht/class_BaseDht.php:211: * @todo Find out if loadDescriptorXml() can be called only once to avoid a lot methods working. +./application/hub/classes/dht/class_BaseDht.php:251: * @todo 0% done +./application/hub/classes/dht/class_BaseDht.php:262: * @todo Switch flag 'accept_bootstrap' +./application/hub/classes/dht/class_BaseDht.php:95: * @todo Find more to do here +./application/hub/classes/dht/node/class_NodeDhtFacade.php:73: * @todo Does this data need to be enriched with more meta data? +./application/hub/classes/discovery/class_BaseNodeDiscovery.php:62: * @todo 0% done +./application/hub/classes/discovery/protocol/class_ProtocolDiscovery.php:104: // @TODO Add some validation here??? +./application/hub/classes/discovery/recipient/package/class_PackageRecipientDiscovery.php:125: // @TODO Unfinished: $this->getListInstance()->addEntry('unl', $decodedData[NetworkPackage::PACKAGE_DATA_RECIPIENT]); +./application/hub/classes/discovery/recipient/package/class_PackageRecipientDiscovery.php:96: * @todo Add some validation of recipient field, e.g. an Universal Node Locator is found +./application/hub/classes/discovery/recipient/package/class_PackageRecipientDiscovery.php:97: * @todo Enrich both messages with recipient data +./application/hub/classes/factories/handler/class_ProtocolHandlerFactory.php:20: * @todo Unfinished stuff +./application/hub/classes/factories/socket/class_SocketFactory.php:22: * @todo Find an interface for hub helper +./application/hub/classes/filter/apt-proxy/class_AptProxyInitializationFilter.php:64: * @todo 0% done +./application/hub/classes/filter/apt-proxy/class_AptProxyPhpRequirementsFilter.php:63: * @todo Add more test and try to add an extra message to the thrown exception +./application/hub/classes/filter/apt-proxy/class_AptProxyWelcomeTeaserFilter.php:64: * @todo Handle over the $responseInstance to outputConsoleTeaser() +./application/hub/classes/filter/bootstrap/apt-proxy/class_AptProxyBootstrapGenericActivationFilter.php:63: * @todo Maybe we want to do somthing more here? +./application/hub/classes/filter/bootstrap/chat/class_ChatBootstrapGenericActivationFilter.php:63: * @todo Maybe we want to do somthing more here? +./application/hub/classes/filter/bootstrap/crawler/class_CrawlerBootstrapGenericActivationFilter.php:63: * @todo Maybe we want to do somthing more here? +./application/hub/classes/filter/bootstrap/cruncher/class_CruncherBootstrapBufferQueueInitializerFilter.php:63: * @todo 0% done +./application/hub/classes/filter/bootstrap/cruncher/class_CruncherBootstrapGenericActivationFilter.php:63: * @todo Maybe we want to do somthing more here? +./application/hub/classes/filter/bootstrap/miner/class_MinerBootstrapBufferQueueInitializerFilter.php:63: * @todo 0% done +./application/hub/classes/filter/bootstrap/miner/class_MinerBootstrapGenericActivationFilter.php:63: * @todo Maybe we want to do somthing more here? +./application/hub/classes/filter/bootstrap/node/class_NodeBootstrapGeneratePrivateKeyFilter.php:66: * @todo 0% done +./application/hub/classes/filter/chat/class_ChatInitializationFilter.php:64: * @todo 0% done +./application/hub/classes/filter/chat/class_ChatPhpRequirementsFilter.php:63: * @todo Add more test and try to add an extra message to the thrown exception +./application/hub/classes/filter/chat/class_ChatWelcomeTeaserFilter.php:64: * @todo Handle over the $responseInstance to outputConsoleTeaser() +./application/hub/classes/filter/class_BaseHubFilter.php:66: * @todo Exceptions from renderXmlContent() are currently unhandled +./application/hub/classes/filter/crawler/class_CrawlerInitializationFilter.php:64: * @todo 0% done +./application/hub/classes/filter/crawler/class_CrawlerPhpRequirementsFilter.php:63: * @todo Add more test and try to add an extra message to the thrown exception +./application/hub/classes/filter/crawler/class_CrawlerWelcomeTeaserFilter.php:64: * @todo Handle over the $responseInstance to outputConsoleTeaser() +./application/hub/classes/filter/cruncher/class_CruncherInitializationFilter.php:64: * @todo 0% done +./application/hub/classes/filter/cruncher/class_CruncherInitializationFilter.php:97: // @TODO Can we rewrite this to app_exit() ? +./application/hub/classes/filter/cruncher/class_CruncherPhpRequirementsFilter.php:63: * @todo Add more test and try to add an extra message to the thrown exception +./application/hub/classes/filter/cruncher/class_CruncherWelcomeTeaserFilter.php:64: * @todo Handle over the $responseInstance to outputConsoleTeaser() +./application/hub/classes/filter/miner/class_MinerInitializationFilter.php:64: * @todo 0% done +./application/hub/classes/filter/miner/class_MinerInitializationFilter.php:97: // @TODO Can we rewrite this to app_exit() ? +./application/hub/classes/filter/miner/class_MinerPhpRequirementsFilter.php:63: * @todo Add more test and try to add an extra message to the thrown exception +./application/hub/classes/filter/miner/class_MinerWelcomeTeaserFilter.php:64: * @todo Handle over the $responseInstance to outputConsoleTeaser() +./application/hub/classes/filter/node/class_NodeInitializationFilter.php:74: // @TODO Can we rewrite this to app_exit() ? +./application/hub/classes/filter/node/class_NodePhpRequirementsFilter.php:66: * @todo Add more test and try to add an extra message to the thrown exception +./application/hub/classes/filter/node/class_NodeWelcomeTeaserFilter.php:67: * @todo Handle over the $responseInstance to outputConsoleTeaser() +./application/hub/classes/filter/shutdown/node/class_NodeShutdownFlushNodeListFilter.php:67: * @todo 0% done +./application/hub/classes/filter/shutdown/node/class_NodeShutdownTaskHandlerFilter.php:67: * @todo 0% done +./application/hub/classes/filter/task/apt-proxy/class_AptProxyTaskHandlerInitializerFilter.php:65: * @todo 5% done +./application/hub/classes/filter/task/chat/class_ChatTaskHandlerInitializerFilter.php:65: * @todo 5% done +./application/hub/classes/filter/task/crawler/class_CrawlerTaskHandlerInitializerFilter.php:65: * @todo 10% done +./application/hub/classes/filter/task/cruncher/class_CruncherTaskHandlerInitializerFilter.php:65: * @todo 5% done +./application/hub/classes/filter/task/miner/class_MinerTaskHandlerInitializerFilter.php:65: * @todo 5% done +./application/hub/classes/filter/task/miner/class_MinerTaskHandlerInitializerFilter.php:92: * 3) A task for generating a real "genesis" block. @TODO Define how a +./application/hub/classes/filter/task/node/class_NodeTaskHandlerInitializerFilter.php:69: * @todo Maybe some more tasks needs to be added? +./application/hub/classes/handler/answer-status/announcement/class_NodeAnnouncementAnswerOkayHandler.php:75: * @todo Do some more here: Handle karma, et cetera? +./application/hub/classes/handler/answer-status/requests/class_RequestNodeListAnswerOkayHandler.php:112: * @todo 0% done +./application/hub/classes/handler/answer-status/requests/class_RequestNodeListAnswerOkayHandler.php:124: * @todo 0% done +./application/hub/classes/handler/answer-status/requests/class_RequestNodeListAnswerOkayHandler.php:72: * @todo Do some more here: Handle karma, et cetera? +./application/hub/classes/handler/message-types/answer/class_NodeMessageDhtBootstrapAnswerHandler.php:102: * @todo ~30% done +./application/hub/classes/handler/message-types/self-connect/class_NodeMessageSelfConnectHandler.php:83: // @TODO Throw an exception here instead of dying +./application/hub/classes/handler/network/udp/class_UdpRawDataHandler.php:66: * @todo 0% +./application/hub/classes/handler/protocol/class_BaseProtocolHandler.php:117: * @TODO If you know why, please fix and explain it to me. +./application/hub/classes/handler/raw_data/network/class_BaseRawDataHandler.php:159: * @todo This method will be moved to a better place +./application/hub/classes/helper/class_BaseHubSystemHelper.php:93: * @todo 0% done +./application/hub/classes/helper/connection/ipv4/class_BaseIpV4ConnectionHelper.php:110: * @todo Rewrite the while() loop to a iterator to not let the software stay very long here +./application/hub/classes/helper/connection/ipv4/class_BaseIpV4ConnectionHelper.php:18: * @todo Find an interface for hub helper +./application/hub/classes/helper/connection/ipv4/class_BaseIpV4ConnectionHelper.php:82: // @TODO Move this to the socket error handler +./application/hub/classes/helper/connection/ipv4/tcp/class_TcpConnectionHelper.php:127: // @TODO Rewrite this test for UNLs +./application/hub/classes/helper/connection/ipv4/tcp/class_TcpConnectionHelper.php:134: // @TODO Rewrite this test for UNLs +./application/hub/classes/helper/connection/ipv4/tcp/class_TcpConnectionHelper.php:167: * @todo We may want to implement a filter for ease notification of other objects like our pool +./application/hub/classes/helper/connection/ipv4/tcp/class_TcpConnectionHelper.php:19: * @todo Find an interface for hub helper +./application/hub/classes/helper/connection/ipv4/tcp/class_TcpConnectionHelper.php:58: * @todo $errorCode/-Message are now in handleSocketError()'s call-back methods +./application/hub/classes/helper/connection/ipv4/tcp/class_TcpConnectionHelper.php:98: // @TODO The whole resolving part should be moved out and made more configurable +./application/hub/classes/helper/connection/ipv4/udp/class_UdpConnectionHelper.php:16: * @todo Find an interface for hub helper +./application/hub/classes/helper/connection/ipv4/udp/class_UdpConnectionHelper.php:62: * @todo Implement a filter for ease notification of other objects like the pool +./application/hub/classes/helper/dht/class_DhtBootstrapHelper.php:18: * @todo Find an interface for hub helper +./application/hub/classes/helper/dht/class_DhtPublishEntryHelper.php:18: * @todo Find an interface for hub helper +./application/hub/classes/helper/node/announcement/class_NodeAnnouncementHelper.php:17: * @todo Find an interface for hub helper +./application/hub/classes/helper/node/answer/announcement/class_NodeAnnouncementMessageAnswerHelper.php:16: * @todo Find an interface for hub helper +./application/hub/classes/helper/node/answer/dht/class_NodeDhtBootstrapMessageAnswerHelper.php:16: * @todo Find an interface for hub helper +./application/hub/classes/helper/node/answer/requests/class_NodeRequestNodeListMessageAnswerHelper.php:16: * @todo Find an interface for hub helper +./application/hub/classes/helper/node/connection/class_NodeSelfConnectHelper.php:17: * @todo Find an interface for hub helper +./application/hub/classes/helper/node/requests/class_NodeRequestNodeListHelper.php:17: * @todo Find an interface for hub helper +./application/hub/classes/helper/work_units/cruncher/class_CruncherTestUnitHelper.php:53: * @todo 0% done +./application/hub/classes/helper/work_units/cruncher/class_CruncherTestUnitHelper.php:64: * @todo 0% done +./application/hub/classes/iterator/network/class_NetworkListenIterator.php:16: * @todo This current implementation is not recommended, use a +./application/hub/classes/iterator/network/class_NetworkListenIterator.php:17: * @todo latency-based iteration or similar approaches +./application/hub/classes/iterator/pool/handler/class_HandlerPoolIterator.php:16: * @todo This current implementation is not recommended, use a +./application/hub/classes/iterator/pool/handler/class_HandlerPoolIterator.php:17: * @todo latency-based iteration or similar approaches +./application/hub/classes/iterator/pool/monitor/class_MonitorPoolIterator.php:17: * @todo This current implementation is not recommended, use a +./application/hub/classes/iterator/pool/monitor/class_MonitorPoolIterator.php:18: * @todo latency-based iteration or similar approaches +./application/hub/classes/iterator/pool/tasks/class_TaskPoolIterator.php:17: * @todo This current implementation is not recommended, use a +./application/hub/classes/iterator/pool/tasks/class_TaskPoolIterator.php:18: * @todo latency-based iteration or similar approaches +./application/hub/classes/listener/class_BaseListener.php:340: // @TODO On some systems it is 134, on some 107? +./application/hub/classes/listener/class_BaseListener.php:437: // @TODO Does this work on Windozer boxes??? +./application/hub/classes/listener/tcp/class_TcpListener.php:67: * @todo Needs rewrite! +./application/hub/classes/listener/udp/class_UdpListener.php:156: * @todo ~50% done +./application/hub/classes/listener/udp/class_UdpListener.php:63: * @todo Needs rewrite! +./application/hub/classes/miner/chash/class_HubCoinMiner.php:107: // @TODO Implement this method +./application/hub/classes/miner/chash/class_HubCoinMiner.php:117: * @todo Implement this method +./application/hub/classes/miner/chash/class_HubCoinMiner.php:147: * @todo 0% done +./application/hub/classes/miner/class_BaseHubMiner.php:225: * @todo Try to make this method more generic so we can move it in BaseFrameworkSystem +./application/hub/classes/nodes/boot/class_HubBootNode.php:127: // @TODO Add some filters here +./application/hub/classes/nodes/boot/class_HubBootNode.php:69: * @todo add some more special bootstrap things for this boot node +./application/hub/classes/nodes/class_BaseHubNode.php:160: * @todo Make this code more generic and move it to CryptoHelper or +./application/hub/classes/nodes/class_BaseHubNode.php:421: * @todo Try to make this method more generic so we can move it in BaseFrameworkSystem +./application/hub/classes/nodes/class_BaseHubNode.php:461: * @todo Change the first if() block to check for a specific state +./application/hub/classes/nodes/class_BaseHubNode.php:679: * @todo Add checking if this node has been announced to the sender node +./application/hub/classes/nodes/class_BaseHubNode.php:699: * @todo Add checking if this node has been announced to the sender node +./application/hub/classes/nodes/class_BaseHubNode.php:804: * @todo Find more to do here +./application/hub/classes/nodes/class_BaseHubNode.php:817: * @todo Handle thrown exception +./application/hub/classes/nodes/list/class_HubListNode.php:68: * @todo Implement more bootstrap steps +./application/hub/classes/nodes/list/class_HubListNode.php:89: // @TODO Add some filters here +./application/hub/classes/nodes/list/class_HubListNode.php:98: * @todo 0% done +./application/hub/classes/nodes/master/class_HubMasterNode.php:101: * @todo 0% done +./application/hub/classes/nodes/master/class_HubMasterNode.php:67: * @todo Implement this method +./application/hub/classes/nodes/master/class_HubMasterNode.php:92: // @TODO Add some filters here +./application/hub/classes/nodes/regular/class_HubRegularNode.php:68: * @todo Implement this method +./application/hub/classes/nodes/regular/class_HubRegularNode.php:89: // @TODO Add some filters here +./application/hub/classes/nodes/regular/class_HubRegularNode.php:98: * @todo 0% done +./application/hub/classes/package/class_NetworkPackage.php:1296: * @todo This may be enchanced for outgoing packages? +./application/hub/classes/package/class_NetworkPackage.php:1414: * @todo Implement verification of all sent tags here? +./application/hub/classes/package/class_NetworkPackage.php:1491: * @todo ~10% done? +./application/hub/classes/package/class_NetworkPackage.php:1533: $this->partialStub('@TODO nodeId=' . $nodeId . ',messageData=' . print_r($messageData, TRUE)); +./application/hub/classes/package/class_NetworkPackage.php:434: // @TODO md5() is very weak, but it needs to be fast +./application/hub/classes/package/class_NetworkPackage.php:508: // @TODO md5() is very weak, but it needs to be fast +./application/hub/classes/package/class_NetworkPackage.php:51: * @todo Needs to add functionality for handling the object's type +./application/hub/classes/package/class_NetworkPackage.php:691: // @TODO We may want to do somthing more here? +./application/hub/classes/package/class_NetworkPackage.php:741: * @todo Unfinished area, hashes are currently NOT fully supported +./application/hub/classes/package/fragmenter/class_PackageFragmenter.php:287: * @todo Implement a way to send non-announcement packages with extra-salt +./application/hub/classes/package/fragmenter/class_PackageFragmenter.php:382: // @TODO This assert broke packages where the hash chunk was very large: assert(strlen($rawData) <= NetworkPackage::TCP_PACKAGE_SIZE); +./application/hub/classes/package/fragmenter/class_PackageFragmenter.php:453: * @todo $helperInstance is unused +./application/hub/classes/producer/cruncher/keys/class_CruncherKeyProducer.php:124: // @TODO Send the produced key bundle to the unit producer's input queue +./application/hub/classes/producer/cruncher/keys/class_CruncherKeyProducer.php:70: * @todo Find something for init phase of this key producer +./application/hub/classes/producer/cruncher/keys/class_CruncherKeyProducer.php:79: * @todo 0% done +./application/hub/classes/producer/cruncher/keys/class_CruncherKeyProducer.php:90: * @todo ~30% done +./application/hub/classes/producer/cruncher/work_units/class_CruncherTestUnitProducer.php:121: * @todo Maybe unfinished +./application/hub/classes/producer/cruncher/work_units/class_CruncherTestUnitProducer.php:88: * @todo ~60% done +./application/hub/classes/producer/cruncher/work_units/class_CruncherTestUnitProducer.php:97: // @TODO Unfinished work here +./application/hub/classes/producer/miner/blocks/class_MinerRealGenesisBlockProducer.php:67: * @todo 0% done +./application/hub/classes/producer/miner/blocks/class_MinerRealGenesisBlockProducer.php:77: * @todo 0% done +./application/hub/classes/producer/miner/blocks/class_MinerRealGenesisBlockProducer.php:88: * @todo ~5% done +./application/hub/classes/producer/miner/blocks/class_MinerTestGenesisBlockProducer.php:59: * @todo 0% done +./application/hub/classes/producer/miner/blocks/class_MinerTestGenesisBlockProducer.php:69: * @todo 0% done +./application/hub/classes/producer/miner/blocks/class_MinerTestGenesisBlockProducer.php:80: * @todo ~5% done +./application/hub/classes/recipient/dht/class_DhtRecipient.php:86: // @TODO Unfinished +./application/hub/classes/recipient/self/class_SelfRecipient.php:71: // @TODO Add more checks on data +./application/hub/classes/resolver/protocol/tcp/class_TcpProtocolResolver.php:71: * @todo 0% done +./application/hub/classes/resolver/state/peer/class_PeerStateResolver.php:69: * @todo ~30% done +./application/hub/classes/resolver/state/peer/class_PeerStateResolver.php:79: // @TODO Maybe no longer needed? +./application/hub/classes/scanner/crawler/uploaded_list/class_CrawlerUploadedListScanner.php:58: * @todo 0% done +./application/hub/classes/source/class_BaseUrlSource.php:81: * @todo ~10% done +./application/hub/classes/source/class_BaseUrlSource.php:91: // @TODO Add more elements +./application/hub/classes/source/urls/class_CrawlerFoundRssUrlSource.php:61: * @todo 0% done +./application/hub/classes/source/urls/class_CrawlerLocalStartUrlSource.php:61: * @todo 0% done +./application/hub/classes/source/urls/class_CrawlerRssStartUrlSource.php:61: * @todo 0% done +./application/hub/classes/source/urls/class_CrawlerUploadedListUrlSource.php:346: * @todo ~40% done +./application/hub/classes/states/communicator/init/class_CommunicatorInitState.php:66: * @todo 0% done? +./application/hub/classes/states/crawler/active/class_CrawlerActiveState.php:63: * @todo 0% done +./application/hub/classes/states/crawler/booting/class_CrawlerBootingState.php:62: * @todo 0% done +./application/hub/classes/states/crawler/init/class_CrawlerInitState.php:72: * @todo ~30% done +./application/hub/classes/states/dht/class_BaseDhtState.php:10: * @todo Create generic DHT interface +./application/hub/classes/states/miner/init/class_MinerInitState.php:62: * @todo 0% done? +./application/hub/classes/states/node/active/class_NodeActiveState.php:80: * @todo We might want to move some calls to this method to fill it with life +./application/hub/classes/states/node/init/class_NodeInitState.php:65: * @todo We might want to move some calls to this method to fill it with life +./application/hub/classes/statistics/connection/class_ConnectionStatisticsHelper.php:106: // @TODO last_update is not being used at the moment +./application/hub/classes/statistics/connection/class_ConnectionStatisticsHelper.php:18: * @todo Find an interface for hub helper +./application/hub/classes/statistics/connection/class_ConnectionStatisticsHelper.php:36: * @TODO Add more protocols to use +./application/hub/classes/streams/raw_data/input/class_RawDataInputStream.php:64: * @todo Do we need to do something more here? +./application/hub/classes/tasks/apt-proxy/class_AptProxyListenerTask.php:71: * @todo 0% +./application/hub/classes/tasks/apt-proxy/class_AptProxyListenerTask.php:81: * @todo 0% done +./application/hub/classes/tasks/chat/class_ChatTelnetListenerTask.php:71: * @todo 0% +./application/hub/classes/tasks/chat/class_ChatTelnetListenerTask.php:81: * @todo 0% done +./application/hub/classes/tasks/crawler/communicator/class_CrawlerNodeCommunicatorTask.php:62: * @todo Maybe visit some sub-objects +./application/hub/classes/tasks/crawler/communicator/class_CrawlerNodeCommunicatorTask.php:92: * @todo 0% done +./application/hub/classes/tasks/crawler/document_parser/class_CrawlerDocumentParserTask.php:61: * @todo Maybe visit some sub-objects +./application/hub/classes/tasks/crawler/document_parser/class_CrawlerDocumentParserTask.php:72: * @todo 0% +./application/hub/classes/tasks/crawler/document_parser/class_CrawlerDocumentParserTask.php:82: * @todo 0% done +./application/hub/classes/tasks/crawler/mime_sniffer/class_CrawlerMimeSnifferTask.php:61: * @todo Maybe visit some sub-objects +./application/hub/classes/tasks/crawler/mime_sniffer/class_CrawlerMimeSnifferTask.php:72: * @todo 0% +./application/hub/classes/tasks/crawler/mime_sniffer/class_CrawlerMimeSnifferTask.php:82: * @todo 0% done +./application/hub/classes/tasks/crawler/ping/class_CrawlerPingTask.php:61: * @todo Maybe visit some sub-objects +./application/hub/classes/tasks/crawler/ping/class_CrawlerPingTask.php:72: * @todo 0% +./application/hub/classes/tasks/crawler/ping/class_CrawlerPingTask.php:82: * @todo 0% done +./application/hub/classes/tasks/crawler/publisher/class_CrawlerRemoteJobPublisherTask.php:61: * @todo Maybe visit some sub-objects +./application/hub/classes/tasks/crawler/publisher/class_CrawlerRemoteJobPublisherTask.php:72: * @todo 0% +./application/hub/classes/tasks/crawler/publisher/class_CrawlerRemoteJobPublisherTask.php:82: * @todo 0% done +./application/hub/classes/tasks/crawler/scanner/uploaded_list/class_CrawlerUploadedListScannerTask.php:64: * @todo Maybe visit some sub-objects +./application/hub/classes/tasks/crawler/scanner/uploaded_list/class_CrawlerUploadedListScannerTask.php:85: * @todo 0% done +./application/hub/classes/tasks/crawler/snippet_extractor/class_CrawlerSnippetExtractorTask.php:61: * @todo Maybe visit some sub-objects +./application/hub/classes/tasks/crawler/snippet_extractor/class_CrawlerSnippetExtractorTask.php:72: * @todo 0% +./application/hub/classes/tasks/crawler/snippet_extractor/class_CrawlerSnippetExtractorTask.php:82: * @todo 0% done +./application/hub/classes/tasks/crawler/structure_analyzer/class_CrawlerStructureAnalyzerTask.php:61: * @todo Maybe visit some sub-objects +./application/hub/classes/tasks/crawler/structure_analyzer/class_CrawlerStructureAnalyzerTask.php:72: * @todo 0% +./application/hub/classes/tasks/crawler/structure_analyzer/class_CrawlerStructureAnalyzerTask.php:82: * @todo 0% done +./application/hub/classes/tasks/crawler/url_crawler/local/class_CrawlerLocalUrlCrawlerTask.php:61: * @todo Maybe visit some sub-objects +./application/hub/classes/tasks/crawler/url_crawler/local/class_CrawlerLocalUrlCrawlerTask.php:72: * @todo 0% +./application/hub/classes/tasks/crawler/url_crawler/local/class_CrawlerLocalUrlCrawlerTask.php:82: * @todo 0% done +./application/hub/classes/tasks/crawler/url_crawler/remote/class_CrawlerRemoteUrlCrawlerTask.php:61: * @todo Maybe visit some sub-objects +./application/hub/classes/tasks/crawler/url_crawler/remote/class_CrawlerRemoteUrlCrawlerTask.php:72: * @todo 0% +./application/hub/classes/tasks/crawler/url_crawler/remote/class_CrawlerRemoteUrlCrawlerTask.php:82: * @todo 0% done +./application/hub/classes/tasks/crawler/url_source/class_CrawlerUrlSourceFoundRssTask.php:61: * @todo Maybe visit some sub-objects +./application/hub/classes/tasks/crawler/url_source/class_CrawlerUrlSourceFoundRssTask.php:94: * @todo 0% done +./application/hub/classes/tasks/crawler/url_source/class_CrawlerUrlSourceLocalStartTask.php:61: * @todo Maybe visit some sub-objects +./application/hub/classes/tasks/crawler/url_source/class_CrawlerUrlSourceLocalStartTask.php:94: * @todo 0% done +./application/hub/classes/tasks/crawler/url_source/class_CrawlerUrlSourceRssStartTask.php:61: * @todo Maybe visit some sub-objects +./application/hub/classes/tasks/crawler/url_source/class_CrawlerUrlSourceRssStartTask.php:94: * @todo 0% done +./application/hub/classes/tasks/crawler/url_source/class_CrawlerUrlSourceUploadedListTask.php:61: * @todo Maybe visit some sub-objects +./application/hub/classes/tasks/crawler/url_source/class_CrawlerUrlSourceUploadedListTask.php:94: * @todo 0% done +./application/hub/classes/tasks/cruncher/class_CruncherKeyProducerTask.php:90: * @todo 0% done +./application/hub/classes/tasks/cruncher/class_CruncherTestUnitProducerTask.php:90: * @todo 0% done +./application/hub/classes/tasks/cruncher/class_CruncherWorkUnitFetcherTask.php:91: * @todo 0% done +./application/hub/classes/tasks/miner/block_fetcher/class_MinerBlockFetcherTask.php:91: * @todo 0% done +./application/hub/classes/tasks/miner/block_producer/class_MinerRealGenesisBlockProducerTask.php:91: * @todo 0% done +./application/hub/classes/tasks/miner/block_producer/class_MinerTestGenesisBlockProducerTask.php:90: * @todo 0% done +./application/hub/classes/tasks/miner/communicator/class_MinerNodeCommunicatorTask.php:61: * @todo Maybe visit some sub-objects +./application/hub/classes/tasks/miner/communicator/class_MinerNodeCommunicatorTask.php:91: * @todo 0% done +./application/hub/classes/tasks/network/class_NetworkPackageReaderTask.php:119: * @todo 0% done +./application/hub/classes/tasks/network/class_NetworkPackageReaderTask.php:61: * @todo Also visit some sub-objects? +./application/hub/classes/tasks/network/class_NetworkPackageWriterTask.php:61: * @todo Also visit some sub-objects? +./application/hub/classes/tasks/network/class_NetworkPackageWriterTask.php:97: * @todo 0% done +./application/hub/classes/tasks/node/announcement/class_NodeAnnouncementTask.php:84: * @todo 0% done +./application/hub/classes/tasks/node/chunks/class_NodeChunkAssemblerTask.php:116: * @todo 0% done +./application/hub/classes/tasks/node/chunks/class_NodeChunkAssemblerTask.php:67: * @todo Also visit some sub-objects? +./application/hub/classes/tasks/node/decoder/class_NodePackageDecoderTask.php:90: * @todo 0% done +./application/hub/classes/tasks/node/dht/class_NodeDhtBootstrapTask.php:90: * @todo 0% done +./application/hub/classes/tasks/node/dht/class_NodeDhtInitializationTask.php:90: * @todo 0% done +./application/hub/classes/tasks/node/dht/class_NodeDhtLateBootstrapTask.php:90: * @todo 0% done +./application/hub/classes/tasks/node/dht/class_NodeDhtPublicationCheckTask.php:80: * @todo Add more? +./application/hub/classes/tasks/node/dht/class_NodeDhtPublicationCheckTask.php:97: * @todo 0% done +./application/hub/classes/tasks/node/dht/class_NodeDhtPublicationTask.php:80: * @todo Add more? +./application/hub/classes/tasks/node/dht/class_NodeDhtPublicationTask.php:97: * @todo 0% done +./application/hub/classes/tasks/node/dht/class_NodeDhtQueryTask.php:80: * @todo ~5% done +./application/hub/classes/tasks/node/dht/class_NodeDhtQueryTask.php:97: * @todo 0% done +./application/hub/classes/tasks/node/listener/class_NodeSocketListenerTask.php:74: // @TODO Do we need to visit this task? $visitorInstance->visitTask($this); +./application/hub/classes/tasks/node/listener/class_NodeSocketListenerTask.php:81: * @todo 0% done +./application/hub/classes/tasks/node/listener/class_NodeSocketListenerTask.php:91: * @todo 0% done +./application/hub/classes/tasks/node/ping/class_NodePingTask.php:72: * @todo Also visit some sub-objects? +./application/hub/classes/tasks/node/ping/class_NodePingTask.php:83: * @todo 0% done +./application/hub/classes/tasks/node/ping/class_NodePingTask.php:93: * @todo 0% done +./application/hub/classes/tasks/node/self_connect/class_NodeSelfConnectTask.php:84: * @todo 0% done +./application/hub/classes/tasks/node/tags/class_NodePackageTagsInitTask.php:61: * @todo Maybe visit some sub-objects +./application/hub/classes/tasks/node/tags/class_NodePackageTagsInitTask.php:82: * @todo 0% done +./application/hub/classes/tasks/node/update/class_NodeUpdateCheckTask.php:61: * @todo 0% +./application/hub/classes/tasks/node/update/class_NodeUpdateCheckTask.php:81: * @todo 0% done +./application/hub/classes/template/announcement/class_XmlAnnouncementTemplateEngine.php:16: * @todo This template engine does not make use of setTemplateType() +./application/hub/classes/template/answer/announcement/class_XmlAnnouncementAnswerTemplateEngine.php:102: * @todo Find something useful with this! +./application/hub/classes/template/answer/announcement/class_XmlAnnouncementAnswerTemplateEngine.php:16: * @todo This template engine does not make use of setTemplateType() +./application/hub/classes/template/answer/class_BaseXmlAnswerTemplateEngine.php:16: * @todo This template engine does not make use of setTemplateType() +./application/hub/classes/template/answer/dht/class_XmlDhtBootstrapAnswerTemplateEngine.php:100: * @todo Find something useful with this! +./application/hub/classes/template/answer/dht/class_XmlDhtBootstrapAnswerTemplateEngine.php:16: * @todo This template engine does not make use of setTemplateType() +./application/hub/classes/template/answer/requests/class_XmlRequestNodeListAnswerTemplateEngine.php:16: * @todo This template engine does not make use of setTemplateType() +./application/hub/classes/template/answer/requests/class_XmlRequestNodeListAnswerTemplateEngine.php:88: * @todo Find something useful with this! +./application/hub/classes/template/class_BaseXmlTemplateEngine.php:18: * @todo This template engine does not make use of setTemplateType() +./application/hub/classes/template/connect/class_XmlSelfConnectTemplateEngine.php:16: * @todo This template engine does not make use of setTemplateType() +./application/hub/classes/template/connect/class_XmlSelfConnectTemplateEngine.php:83: * @todo Find something useful with this! +./application/hub/classes/template/dht/class_XmlDhtBootstrapTemplateEngine.php:16: * @todo This template engine does not make use of setTemplateType() +./application/hub/classes/template/entries/class_XmlRequestNodeListEntryTemplateEngine.php:16: * @todo This template engine does not make use of setTemplateType() +./application/hub/classes/template/entries/class_XmlRequestNodeListEntryTemplateEngine.php:70: * @todo Find something useful with this! +./application/hub/classes/template/objects/class_XmlObjectRegistryTemplateEngine.php:146: * @todo Handle $objectCount +./application/hub/classes/template/objects/class_XmlObjectRegistryTemplateEngine.php:17: * @todo This template engine does not make use of setTemplateType() +./application/hub/classes/template/objects/class_XmlObjectRegistryTemplateEngine.php:97: * @todo Find something useful with this! +./application/hub/classes/template/producer/test_units/class_XmlCruncherTestUnitTemplateEngine.php:16: * @todo This template engine does not make use of setTemplateType() +./application/hub/classes/template/producer/test_units/class_XmlCruncherTestUnitTemplateEngine.php:276: * @todo Handle $keyCount +./application/hub/classes/template/publish/class_XmlDhtPublishEntryTemplateEngine.php:16: * @todo This template engine does not make use of setTemplateType() +./application/hub/classes/template/requests/class_XmlRequestNodeListTemplateEngine.php:16: * @todo This template engine does not make use of setTemplateType() +./application/hub/classes/template/requests/class_XmlRequestNodeListTemplateEngine.php:80: * @todo Find something useful with this! +./application/hub/classes/tools/class_HubTools.php:192: // @TODO ((25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9])\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[0-9])):([0-9]{3,5}) +./application/hub/classes/tools/class_HubTools.php:297: // @TODO Find a better validation than empty() +./application/hub/classes/tools/class_HubTools.php:325: // @TODO Find a better validation than empty() +./application/hub/classes/visitor/pool/monitor/class_RawDataPoolMonitorVisitor.php:68: * @todo Maybe throw UnsupportedOperationException? +./application/hub/config.php:766:// @TODO This and the next value is very static again +./application/hub/config.php:827:// @TODO This is very static, rewrite it to more flexible +./application/hub/interfaces/apt-proxy/class_AptProxy.php:18: * @todo We need to find a better name for this interface +./application/hub/interfaces/blocks/class_Minable.php:16: * @todo We need to find a better name for this interface +./application/hub/interfaces/chat/class_Chatter.php:18: * @todo We need to find a better name for this interface +./application/hub/interfaces/crawler/class_Crawler.php:19: * @todo We need to find a better name for this interface +./application/hub/interfaces/cruncher/class_CruncherHelper.php:18: * @todo We need to find a better name for this interface +./application/hub/interfaces/database/frontend/class_NodeDhtWrapper.php:130: * @todo Add minimum/maximum age limitations +./application/hub/interfaces/database/frontend/class_NodeDhtWrapper.php:140: * @todo Add timestamp to dataset instance +./application/hub/interfaces/helper/connections/class_ConnectionHelper.php:16: * @todo Please find another name for this interface +./application/hub/interfaces/helper/connections/class_ConnectionHelper.php:44: * @todo We may want to implement a filter for ease notification of other objects like our pool +./application/hub/interfaces/helper/messages/class_MessageHelper.php:16: * @todo Please find another name for this interface +./application/hub/interfaces/helper/nodes/class_NodeHelper.php:24: * @todo We need to find a better name for this interface +./application/hub/interfaces/miner/class_MinerHelper.php:18: * @todo We need to find a better name for this interface +./core/application/tests/class_ApplicationHelper.php:273: * @todo Nothing to add? +./core/framework/config/class_FrameworkConfiguration.php:127: * @todo This method encapsulates a deprecated PHP function and should be deprecated, too. +./core/framework/config/class_FrameworkConfiguration.php:252: * @todo Have to check some more entries from $_SERVER here +./core/framework/loader/class_ClassLoader.php:232: // @TODO Throw exception instead of break +./core/framework/loader/class_ClassLoader.php:423: /* @TODO: Do not exit here. */ +./core/framework/main/classes/cache/class_MemoryCache.php:17: * @todo Rename to InProgressCache +./core/framework/main/classes/class_BaseFrameworkSystem.php:2090: // @TODO Move the constant to e.g. BaseDatabaseResult when there is a non-cached database result available +./core/framework/main/classes/class_BaseFrameworkSystem.php:2205: * @todo Write a logging mechanism for productive mode +./core/framework/main/classes/class_BaseFrameworkSystem.php:2220: // @TODO Finish this part! +./core/framework/main/classes/class_BaseFrameworkSystem.php:3206: * @todo Improve documentation +./core/framework/main/classes/class_BaseFrameworkSystem.php:338: // @todo Try to clean these constants up +./core/framework/main/classes/class_BaseFrameworkSystem.php:584: // @TODO __CLASS__ does always return BaseFrameworkSystem but not the extending (=child) class +./core/framework/main/classes/class_BaseFrameworkSystem.php:688: * @todo SearchableResult and UpdateableResult shall have a super interface to use here +./core/framework/main/classes/commands/console/class_ConsoleFuseCommand.php:83: // @TODO Unfinished +./core/framework/main/classes/commands/html/class_HtmlLoginAreaCommand.php:78: * @todo Add some stuff here: Some personal data, app/game related data +./core/framework/main/classes/commands/html/class_HtmlProblemCommand.php:70: * @todo 0% done +./core/framework/main/classes/commands/html/class_HtmlStatusCommand.php:70: * @todo 0% done +./core/framework/main/classes/controller/console/class_ConsoleDefaultController.php:19: * @todo This controller shall still provide some headlines for sidebars +./core/framework/main/classes/controller/html/class_HtmlConfirmController.php:50: * @todo Add some filters to this controller +./core/framework/main/classes/controller/html/class_HtmlDefaultController.php:20: * @todo This controller shall still provide some headlines for sidebars +./core/framework/main/classes/controller/html/class_HtmlLoginController.php:51: * @todo Add some filters to this controller +./core/framework/main/classes/controller/html/class_HtmlLogoutController.php:21: * @todo This controller shall still provide some headlines for sidebars +./core/framework/main/classes/controller/html/class_HtmlLogoutDoneController.php:50: * @todo Add some filters to this controller +./core/framework/main/classes/controller/html/class_HtmlProblemController.php:50: * @todo Add some filters to this controller +./core/framework/main/classes/controller/html/class_HtmlRegisterController.php:50: * @todo Add some filters to this controller +./core/framework/main/classes/controller/html/class_HtmlStatusController.php:20: * @todo This controller shall still provide some headlines for sidebars +./core/framework/main/classes/controller/html/login/class_HtmlLoginAreaController.php:51: * @todo Add some morer filters to this controller +./core/framework/main/classes/criteria/dataset/class_DataSetCriteria.php:157: // @TODO Issue a warning +./core/framework/main/classes/criteria/search/class_SearchCriteria.php:109: * @todo Find a nice casting here. (int) allows until and including 32766. +./core/framework/main/classes/criteria/search/class_SearchCriteria.php:77: * @todo Find a nice casting here. (int) allows until and including 32766. +./core/framework/main/classes/crypto/class_CryptoHelper.php:104: // @TODO Maybe rewrite this with DirectoryIterator, similar to Compressor thing? +./core/framework/main/classes/database/backend/class_CachedLocalFileDatabase.php:339: * @todo Do some checks on the database directory and files here +./core/framework/main/classes/database/backend/class_CachedLocalFileDatabase.php:628: * @todo Add more generic non-public data for removal +./core/framework/main/classes/database/class_BaseDatabaseWrapper.php:214: // @TODO Minor: Update above comment to e.g. BaseDatabaseResult +./core/framework/main/classes/database/frontend/class_NewsDatabaseWrapper.php:17: * @todo Add missing own interface for public methods +./core/framework/main/classes/database/frontend/class_PaymentsDatabaseWrapper.php:16: * @todo Add missing own interface for public methods +./core/framework/main/classes/database/result/class_CachedDatabaseResult.php:260: * @todo 0% done +./core/framework/main/classes/database/result/class_CachedDatabaseResult.php:414: * @todo Find a caching way without modifying the result array +./core/framework/main/classes/decorator/template/class_XmlRewriterTemplateDecorator.php:415: * @todo Find something useful with this! +./core/framework/main/classes/discovery/payment/class_LocalPaymentDiscovery.php:96: * @todo 0% done +./core/framework/main/classes/factories/logger/class_LoggerFactory.php:53: // @TODO Unfinished work +./core/framework/main/classes/factories/login/class_LoginFactory.php:47: * @return $loginInstance An instance of a login helper (@TODO Use actual interface name) +./core/framework/main/classes/factories/user/class_UserFactory.php:48: * @return $userInstance An instance of a user class (@TODO use actual interface name) +./core/framework/main/classes/feature/fuse/class_FuseFeature.php:59: * @todo 0% done +./core/framework/main/classes/file_directories/binary/class_BaseBinaryFile.php:856: // @TODO Unfinished +./core/framework/main/classes/file_directories/class_BaseAbstractFile.php:163: * @todo Handle seekStatus +./core/framework/main/classes/file_directories/class_BaseFileIo.php:180: * @todo Handle seekStatus +./core/framework/main/classes/file_directories/directory/class_FrameworkDirectoryPointer.php:78: * @todo Get rid of inConstructor, could be old-lost code. +./core/framework/main/classes/file_directories/io_stream/class_FileIoStream.php:274: * @todo 0% done +./core/framework/main/classes/file_directories/io_stream/class_FileIoStream.php:84: * @todo This method needs heavy rewrite +./core/framework/main/classes/filter/change/class_EmailChangeFilter.php:65: * @todo Implement email change of the user here. HINT: Use the User class! +./core/framework/main/classes/filter/change/class_PasswordChangeFilter.php:65: * @todo Finished updating user password hash here. HINT: Use the User class again. +./core/framework/main/classes/filter/news/class_NewsProcessFilter.php:64: * @todo Unfinished stub, add functionality here +./core/framework/main/classes/filter/payment/class_PaymentDiscoveryFilter.php:111: * @todo 0% done +./core/framework/main/classes/filter/update/class_UserUpdateFilter.php:65: * @todo Add more user updates here +./core/framework/main/classes/filter/verifier/class_AccountPasswordVerifierFilter.php:69: * @todo Rewrite handling of different password fields +./core/framework/main/classes/filter/verifier/class_EmailVerifierFilter.php:64: * @todo 0% done +./core/framework/main/classes/handler/class_BaseHandler.php:74: * @todo Rewrite this to use DHT +./core/framework/main/classes/handler/tasks/class_TaskHandler.php:153: // @TODO Messurement can be added around this call +./core/framework/main/classes/helper/class_BaseHelper.php:193: * @todo Rewrite this method using a helper class for filtering data +./core/framework/main/classes/helper/class_BaseHelper.php:222: // @TODO Try to log it here +./core/framework/main/classes/helper/class_BaseHelper.php:488: $this->debugOutput('[' . __METHOD__ . ':' . __LINE__ . '] fieldName=' . $fieldName . ' is not set! - @TODO'); +./core/framework/main/classes/helper/html/forms/class_HtmlFormHelper.php:114: * @todo Add some unique PIN here to bypass problems with some browser and/or extensions +./core/framework/main/classes/helper/html/forms/class_HtmlFormHelper.php:633: * @todo Add checking if sub option is already added +./core/framework/main/classes/helper/html/forms/class_HtmlFormHelper.php:661: * @todo Add checking if sub option is already added +./core/framework/main/classes/helper/html/forms/class_HtmlFormHelper.php:695: // @TODO We need to log this later +./core/framework/main/classes/helper/html/forms/class_HtmlFormHelper.php:864: * @todo Implement check if rules have been changed +./core/framework/main/classes/helper/html/links/class_HtmlLinkHelper.php:195: * @todo Completely unimplemented +./core/framework/main/classes/images/class_BaseImage.php:179: * @todo Find something usefull for this method. +./core/framework/main/classes/images/class_BaseImage.php:189: * @todo Find something usefull for this method. +./core/framework/main/classes/images/class_BaseImage.php:199: * @todo Find something usefull for this method. +./core/framework/main/classes/images/class_BaseImage.php:209: * @todo Find something usefull for this method. +./core/framework/main/classes/images/class_BaseImage.php:219: * @todo Find something usefull for this method. +./core/framework/main/classes/images/class_BaseImage.php:238: * @todo Find something usefull for this method. +./core/framework/main/classes/images/class_BaseImage.php:257: * @todo Find something usefull for this method. +./core/framework/main/classes/images/class_BaseImage.php:268: * @todo Find something usefull for this method. +./core/framework/main/classes/images/class_BaseImage.php:278: * @todo Find something usefull for this method. +./core/framework/main/classes/index/class_BaseIndex.php:160: * @todo Currently the index file is not cached, please implement a memory-handling class and if enough RAM is found, cache the whole index file. +./core/framework/main/classes/lists/class_BaseList.php:321: // @TODO Extend this somehow? +./core/framework/main/classes/lists/groups/class_ListGroupList.php:68: * @todo 0% done +./core/framework/main/classes/mailer/debug/class_DebugMailer.php:137: * @todo 0% done +./core/framework/main/classes/menu/class_BaseMenu.php:75: // Log exception @TODO Maybe to intrusive? +./core/framework/main/classes/output/console/class_ConsoleOutput.php:65: // @TODO Need to rewrite this to $requestInstance->addHeader() +./core/framework/main/classes/parser/xml/class_XmlParser.php:87: // @TODO We need to find a fallback solution here +./core/framework/main/classes/points/class_UserPoints.php:112: * @todo Finish loading part of points +./core/framework/main/classes/points/class_UserPoints.php:184: * @todo $requestInstance is currently unused +./core/framework/main/classes/request/console/class_ConsoleRequest.php:119: // @TODO Can't this be 'CONSOLE' ? +./core/framework/main/classes/request/html/class_HtmlRequest.php:16: * @todo Move out the cookie part to a seperate class, e.g. Cookie +./core/framework/main/classes/response/html/class_HtmlResponse.php:80: * @todo Encryption of cookie data not yet supported. +./core/framework/main/classes/response/html/class_HtmlResponse.php:81: * @todo Why are these parameters conflicting? +./core/framework/main/classes/response/html/class_HtmlResponse.php:82: * @todo If the return statement is removed and setcookie() commented out, +./core/framework/main/classes/response/html/class_HtmlResponse.php:83: * @todo this will send only one cookie out, the first one. +./core/framework/main/classes/response/image/class_ImageResponse.php:76: // @TODO Please fix this +./core/framework/main/classes/response/image/class_ImageResponse.php:92: * @todo Encryption of cookie data not yet supported. +./core/framework/main/classes/response/image/class_ImageResponse.php:93: * @todo Why are these parameters conflicting? +./core/framework/main/classes/response/image/class_ImageResponse.php:94: * @todo If the return statement is removed and setcookie() commented out, +./core/framework/main/classes/response/image/class_ImageResponse.php:95: * @todo this will send only one cookie out, the first one. +./core/framework/main/classes/rng/class_RandomNumberGenerator.php:104: * @todo Add site key for stronger salt! +./core/framework/main/classes/rng/class_RandomNumberGenerator.php:182: * @todo I had a better random number generator here but now it is somewhere lost :( +./core/framework/main/classes/stacker/file/class_BaseFileStack.php:171: * @todo Currently the stack file is not cached, please implement a memory-handling class and if enough RAM is found, cache the whole stack file. +./core/framework/main/classes/stacker/file/class_BaseFileStack.php:346: // @TODO Please implement this, returning false +./core/framework/main/classes/stacker/file/class_BaseFileStack.php:69: * @todo To hard assertions here, better rewrite them to exceptions +./core/framework/main/classes/streams/crypto/class_McryptStream.php:18: * @todo mcrypt will become deprecated, rewrite to OpenSSL +./core/framework/main/classes/streams/crypto/class_OpenSslStream.php:138: // @TODO unfinished +./core/framework/main/classes/streams/crypto/class_OpenSslStream.php:68: // @TODO unfinished +./core/framework/main/classes/template/class_BaseTemplateEngine.php:1065: // @TODO This silent abort should be logged, maybe. +./core/framework/main/classes/template/class_BaseTemplateEngine.php:1073: // @TODO Old behaviour, will become obsolete! +./core/framework/main/classes/template/class_BaseTemplateEngine.php:1076: // @TODO Yet another old way +./core/framework/main/classes/template/class_BaseTemplateEngine.php:1299: * @todo Make this code some nicer... +./core/framework/main/classes/template/class_BaseTemplateEngine.php:962: * @todo Unfinished work or don't die here. +./core/framework/main/classes/template/class_BaseTemplateEngine.php:987: // @TODO Non-string found so we need some deeper analysis... +./core/framework/main/classes/template/console/class_ConsoleTemplateEngine.php:21: * @todo This template engine does not make use of setTemplateType() +./core/framework/main/classes/template/image/class_ImageTemplateEngine.php:231: * @todo Find something usefull with this! +./core/framework/main/classes/template/image/class_ImageTemplateEngine.php:251: * @todo Add cache creation here +./core/framework/main/classes/template/mail/class_MailTemplateEngine.php:244: * @todo Add cache creation here +./core/framework/main/classes/template/mail/class_MailTemplateEngine.php:24: * @todo This template engine does not make use of setTemplateType() +./core/framework/main/classes/template/mail/class_MailTemplateEngine.php:254: * @todo Should we call back the mailer class here? +./core/framework/main/classes/template/mail/class_MailTemplateEngine.php:333: * @todo 0% done +./core/framework/main/classes/template/menu/class_MenuTemplateEngine.php:319: * @todo Find something useful with this! +./core/framework/main/classes/template/menu/class_MenuTemplateEngine.php:365: * @todo Add cache creation here +./core/framework/main/classes/tools/console/class_ConsoleTools.php:167: * @todo This should be connected to a caching class to cache DNS requests +./core/framework/main/classes/tools/console/class_ConsoleTools.php:192: // @TODO Here should the cacher be implemented +./core/framework/main/classes/tools/console/class_ConsoleTools.php:290: * @todo This should be moved out to an external class, e.g. HttpClient +./core/framework/main/classes/tools/console/class_ConsoleTools.php:291: * @todo Make IP, host name, port and script name configurable +./core/framework/main/classes/tools/console/class_ConsoleTools.php:298: // @TODO Add some DNS caching here +./core/framework/main/classes/user/class_BaseUser.php:320: * @todo Try to make this method more generic so we can move it in BaseFrameworkSystem +./core/framework/main/classes/user/class_BaseUser.php:92: * @todo Find a way of casting here. "(int)" might destroy the user id > 32766 +./core/framework/main/classes/user/guest/class_Guest.php:55: * @todo Add more ways over creating user classes +./core/framework/main/classes/user/member/class_Member.php:98: * @todo Add more ways over creating user classes +./core/framework/main/exceptions/compressor/class_MismatchingCompressorsException.php:16: * @todo Rename to CompressorMismatchException +./core/framework/main/exceptions/config/class_ConfigValueTypeUnsupportedException.php:18: * @todo These are invalid argument exceptions +./core/framework/main/exceptions/config/class_NoConfigEntryException.php:16: * @todo Rename this class to NoFoundEntryException +./core/framework/main/exceptions/language/class_LanguagePathIsNoDirectoryException.php:16: * @todo Don't use this anymore +./core/framework/main/exceptions/main/class_MissingMethodException.php:19: * @todo Try to rewrite user/guest login classes and mark this exception as deprecated +./core/framework/main/exceptions/socket/class_NoSocketErrorDetectedException.php:15: * @todo Those are logic exceptions and should be rewritten +./core/framework/main/exceptions/user/class_UserNoGuestException.php:17: * @todo Better rename this +./core/framework/main/interfaces/application/class_ManageableApplication.php:79: * @todo Nothing to add? +./core/framework/main/interfaces/class_FrameworkInterface.php:14: * @todo Find a better name for this interface +./core/framework/main/interfaces/criteria/extended/class_LocalSearchCriteria.php:36: * @todo Find a nice casting here. (int) allows until and including 32766. +./core/framework/main/interfaces/criteria/extended/class_LocalSearchCriteria.php:60: * @todo Find a nice casting here. (int) allows until and including 32766. +./core/framework/main/interfaces/database/backend/class_DatabaseBackend.php:117: * @todo Add more generic non-data for removal +./core/framework/main/interfaces/database/backend/class_DatabaseBackend.php:69: * @todo Do some checks on the database directory and files here +./core/framework/main/interfaces/handler/task/class_HandleableTask.php:18: * @todo HandleableDataSet looks strange here +./core/framework/main/interfaces/visitor/decorator/class_DecoratorVisitor.php:37: * @todo Find interface for this type-hint (only interface/array as type-hints rule) +./core/framework/main/middleware/compressor/class_CompressorChannel.php:121: // @TODO Is there a configurable fall-back compressor needed, or is NullCompressor okay? +./core/framework/main/middleware/database/class_DatabaseConnection.php:70: * @todo $debugInstance is currently not used +./core/framework/main/middleware/debug/class_DebugMiddleware.php:128: // @TODO Initialization phase +./core/framework/main/middleware/io/class_FileIoHandler.php:186: * @todo 0% done +./core/framework/main/tests/filter/tests/configuration/classes/class_TestConfigurationLoadableClassesFilter.php:66: * @todo 0% done +./core/framework/main/tests/filter/tests/requirements/class_TestsPhpRequirementsFilter.php:63: * @todo 0% done +./core/framework/main/third_party/api/wernisportal/class_WernisApi.php:16: * @todo Out-dated since 0.6-BETA +./core/index.php:58: * @todo This method is old code and needs heavy rewrite and should be moved to ApplicationHelper +./index.php:58: * @todo This method is old code and needs heavy rewrite and should be moved to ApplicationHelper ### ### DEPRECATION FOLLOWS: ### ### -./application/hub/main/nodes/class_BaseHubNode.php:46: * @deprecated -./core/inc/classes.php:9: * @deprecated -./core/inc/classes/exceptions/main/class_MissingMethodException.php:14: * @deprecated Please do no longer use this exception -./core/inc/classes/interfaces/database/backend/class_DatabaseFrontendInterface.php:2:// @DEPRECATED -./core/inc/classes/interfaces/database/frontend/class_DatabaseFrontendInterface.php:2:// @DEPRECATED -./core/inc/classes/main/database/class_BaseDatabaseFrontend.php:2:// @DEPRECATED -./core/inc/classes/main/handler/class_BaseHandler.php:2:// @DEPRECATED -./core/inc/classes/main/handler/raw_data/class_BaseRawDataHandler.php:2:// @DEPRECATED -./core/inc/database.php:10: * @deprecated -./core/inc/hooks.php:2:// @DEPRECATED -./core/inc/includes.php:10: * @deprecated -./core/inc/output.php:10: * @deprecated -./core/inc/selector.php:10: * @deprecated +./application/hub/classes/nodes/class_BaseHubNode.php:72: * @deprecated +./application/hub/data.php:2:// @DEPRECATED +./application/hub/exceptions/state/class_UnexpectedStateException.php:2:// @DEPRECATED +./application/hub/init.php:2:// @DEPRECATED +./application/hub/loader.php:2:// @DEPRECATED +./application/hub/starter.php:2:// @DEPRECATED +./core/application/tests/data.php:2:// @DEPRECATED +./core/application/tests/init.php:2:// @DEPRECATED +./core/application/tests/loader.php:2:// @DEPRECATED +./core/application/tests/starter.php:2:// @DEPRECATED +./core/framework/classes.php:2:// @DEPRECATED +./core/framework/config/config-hubmaster.php:2:// @DEPRECATED +./core/framework/config-global.php:54:// @DEPRECATED As PHP is deprecating this +./core/framework/database/lib-lfdb.php:2:// @DEPRECATED +./core/framework/database.php:2:// @DEPRECATED +./core/framework/includes.php:2:// @DEPRECATED +./core/framework/main/classes/class_BaseFrameworkSystem.php:1839: * @deprecated Not fully, as the new Logger facilities are not finished yet. +./core/framework/main/exceptions/base64/class_Base64EncodingBadException.php:17: * @deprecated Don't use this anymore +./core/framework/main/exceptions/base64/class_Base64EncodingModuloException.php:16: * @deprecated Don't use this anymore +./core/framework/main/exceptions/crypto/class_EncryptInvalidLengthException.php:17: * @deprecated Don't use this anymore +./core/framework/main/exceptions/crypto/class_EncryptMissingException.php:17: * @deprecated Don't use this anymore +./core/framework/main/exceptions/database/local_file/class_SavePathIsEmptyException.php:16: * @deprecated Please don't use this anymore. +./core/framework/main/exceptions/database/local_file/class_SavePathIsNoDirectoryException.php:13: * @deprecated Don't use this +./core/framework/main/exceptions/database/local_file/class_SavePathReadProtectedException.php:13: * @deprecated Please don't use this +./core/framework/main/exceptions/database/local_file/class_SavePathWriteProtectedException.php:13: * @deprecated Please don't use this +./core/framework/main/exceptions/file_directory/class_FileIsEmptyException.php:16: * @deprecated Don't use this anymore +./core/framework/main/exceptions/file_directory/class_InvalidDataLengthException.php:16: * @deprecated Don't use this anymore +./core/framework/main/exceptions/file_directory/class_InvalidMD5ChecksumException.php:16: * @deprecated Don't use this anymore +./core/framework/main/exceptions/file_directory/class_PathIsNoDirectoryException.php:16: * @deprecated Don't use this anymore +./core/framework/main/exceptions/file_directory/class_PathReadProtectedException.php:16: * @deprecated Don't use this anymore +./core/framework/main/exceptions/filter/class_InvalidFilterChainException.php:16: * @deprecated Don't use this anymore +./core/framework/main/exceptions/helper/class_FormClosedException.php:17: * @deprecated Don't use this anymore +./core/framework/main/exceptions/helper/class_FormGroupClosedException.php:16: * @deprecated Don't use this anymore +./core/framework/main/exceptions/helper/class_FormOpenedException.php:17: * @deprecated Don't use this anymore +./core/framework/main/exceptions/helper/class_HelperGroupAlreadyCreatedException.php:16: * @deprecated Don't use this anymore +./core/framework/main/exceptions/helper/class_HelperNoPreviousOpenedSubGroupException.php:16: * @deprecated Don't use this anymore +./core/framework/main/exceptions/helper/class_HelperSubGroupAlreadyCreatedException.php:16: * @deprecated Don't use this anymore +./core/framework/main/exceptions/helper/class_InvalidFormNameException.php:16: * @deprecated Don't use this anymore +./core/framework/main/exceptions/helper/class_NoGroupOpenedException.php:16: * @deprecated Don't use this anymore +./core/framework/main/exceptions/helper/class_UserInstanceMissingException.php:16: * @deprecated Don't use this anymore +./core/framework/main/exceptions/language/class_InvalidLanguagePathStringException.php:16: * @deprecated Don't use this anymore +./core/framework/main/exceptions/language/class_LanguagePathReadProtectedException.php:16: * @deprecated Don't use this anymore +./core/framework/main/exceptions/main/class_DimNotFoundInArrayException.php:16: * @deprecated Please don't use this anymore +./core/framework/main/exceptions/main/class_InvalidArrayCountException.php:16: * @deprecated Don't use this anymore +./core/framework/main/exceptions/main/class_InvalidClassNameException.php:16: * @deprecated Don't use this anymore +./core/framework/main/exceptions/main/class_InvalidCommandInstanceException.php:2:// @DEPRECATED +./core/framework/main/exceptions/main/class_InvalidObjectException.php:17: * @deprecated Don't use this anymore +./core/framework/main/exceptions/main/class_MissingDecimalsThousandsSeparatorException.php:16: * @deprecated Don't use this anymore +./core/framework/main/exceptions/main/class_MissingMethodException.php:20: * @deprecated Please do no longer use this exception +./core/framework/main/exceptions/main/class_VariableIsNotSetException.php:16: * @deprecated Don't use this anymore +./core/framework/main/exceptions/socket/class_SocketAlreadyRegisteredException.php:14: * @deprecated Don't use this anymore +./core/framework/main/exceptions/stacker/class_EmptyStackerException.php:16: * @deprecated Don't use this anymore +./core/framework/main/exceptions/template/class_BasePathIsEmptyException.php:2:// @DEPRECATED +./core/framework/main/exceptions/template/class_BasePathReadProtectedException.php:16: * @deprecated Don't use this anymore +./core/framework/main/exceptions/template/class_InvalidBasePathStringException.php:2:// @DEPRECATED +./core/framework/main/exceptions/template/class_NoVariableException.php:16: * @deprecated Don't use this anymore +./core/framework/main/exceptions/template/class_UnexpectedTemplateTypeException.php:16: * @deprecated Don't use this anymore +./core/framework/main/middleware/debug/class_DebugMiddleware.php:22: * @deprecated See LoggerFactory for a more flexible approach +./core/framework/selector.php:2:// @DEPRECATED