application/hub/interfaces/handler/task/.htaccess -text svneol=unset#text/plain
application/hub/interfaces/handler/task/class_HandleableTask.php -text svneol=unset#text/plain
application/hub/interfaces/helper/.htaccess -text svneol=unset#text/plain
+application/hub/interfaces/helper/connections/.htaccess -text
+application/hub/interfaces/helper/connections/class_ConnectionHelper.php -text
application/hub/interfaces/helper/hub/.htaccess -text svneol=unset#text/plain
application/hub/interfaces/helper/hub/class_HelpableHub.php svneol=native#text/plain
application/hub/interfaces/helper/messages/.htaccess svneol=native#text/plain
application/hub/main/factories/discovery/.htaccess -text svneol=unset#text/plain
application/hub/main/factories/discovery/class_PackageDiscoveryFactory.php svneol=native#text/plain
application/hub/main/factories/discovery/class_SocketDiscoveryFactory.php svneol=native#text/plain
+application/hub/main/factories/fragmenter/.htaccess -text
+application/hub/main/factories/fragmenter/class_FragmenterFactory.php -text
application/hub/main/factories/lists/.htaccess -text svneol=unset#text/plain
application/hub/main/factories/lists/class_RecipientListFactory.php svneol=native#text/plain
application/hub/main/factories/package/.htaccess -text svneol=unset#text/plain
application/hub/main/factories/package/class_NetworkPackageFactory.php svneol=native#text/plain
+application/hub/main/factories/producer/.htaccess -text
+application/hub/main/factories/producer/class_ProducerFactory.php -text
application/hub/main/factories/socket/.htaccess -text svneol=unset#text/plain
application/hub/main/factories/socket/class_SocketFactory.php svneol=native#text/plain
application/hub/main/factories/source/.htaccess svneol=native#text/plain
application/hub/main/handler/tasks/class_TaskHandler.php -text svneol=unset#text/plain
application/hub/main/helper/.htaccess -text svneol=unset#text/plain
application/hub/main/helper/connection/.htaccess -text svneol=unset#text/plain
+application/hub/main/helper/connection/class_ -text
application/hub/main/helper/connection/class_BaseConnectionHelper.php svneol=native#text/plain
application/hub/main/helper/connection/tcp/.htaccess -text svneol=unset#text/plain
application/hub/main/helper/connection/tcp/class_TcpConnectionHelper.php svneol=native#text/plain
application/hub/main/streams/package/input/class_PackageInputStream.php -text
application/hub/main/streams/package/output/.htaccess svneol=native#text/plain
application/hub/main/streams/package/output/class_PackageOutputStream.php svneol=native#text/plain
+application/hub/main/streams/raw_data/.htaccess svneol=native#text/plain
+application/hub/main/streams/raw_data/input/.htaccess svneol=native#text/plain
+application/hub/main/streams/raw_data/input/class_RawDataInputStream.php -text
+application/hub/main/streams/raw_data/output/.htaccess svneol=native#text/plain
+application/hub/main/streams/raw_data/output/class_RawDataOutputStream.php svneol=native#text/plain
application/hub/main/tags/.htaccess -text svneol=unset#text/plain
application/hub/main/tags/class_ -text svneol=unset#text/plain
application/hub/main/tags/class_BaseTags.php svneol=native#text/plain
// CFG: PACKAGE-FRAGMENTER-CLASS
$cfg->setConfigEntry('package_fragmenter_class', 'PackageFragmenter');
-// CFG: NODE-RAW-PACKAGE-OUTPUT-STREAM
-$cfg->setConfigEntry('node_raw_package_output_stream', 'PackageOutputStream');
-
-// CFG: NODE-RAW-PACKAGE-INPUT-STREAM
-$cfg->setConfigEntry('node_raw_package_input_stream', 'PackageInputStream');
-
// CFG: PACKAGE-CHUNK-SIZE
$cfg->setConfigEntry('package_chunk_size', 256*8);
+// CFG: NODE-RAW-DATA-OUTPUT-STREAM-CLASS
+$cfg->setConfigEntry('node_raw_data_output_stream_class', 'RawDataOutputStream');
+
+// CFG: NODE-RAW-DATA-INPUT-STREAM-CLASS
+$cfg->setConfigEntry('node_raw_data_input_stream_class', 'RawDataInputStream');
+
+///////////////////////////////////////////////////////////////////////////////
+// Cruncher Configuration
+///////////////////////////////////////////////////////////////////////////////
+
// CFG: CRUNCHER-TEST-UNITS-ENABLED
$cfg->setConfigEntry('cruncher_test_units_enabled', 'Y');
*/
interface Networkable extends Handleable {
/**
- * Processes a package from given resource. This is mostly useful for TCP
+ * Processes raw data from given resource. This is mostly useful for TCP
* package handling and is implemented in the TcpListener class
*
* @param $resource A valid resource identifier
* @return void
* @throws InvalidResourceException If the given resource is invalid
*/
- function processResourcePackage ($resource);
+ function processResourceRawData ($resource);
}
// [EOF]
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+/**
+ * An interface for connection helper classes
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 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 <http://www.gnu.org/licenses/>.
+ */
+interface ConnectionHelper extends Helper {
+ /**
+ * Sends raw package data to the recipient
+ *
+ * @param $packageData Raw package data
+ * @return $totalSentBytes Total sent bytes to the peer
+ * @throws InvalidSocketException If we got a problem with this socket
+ */
+ function sendRawPackageData (array $packageData);
+
+ /**
+ * Checks wether the connect retry is exhausted
+ *
+ * @return $isExhaused Wether connect retry is exchausted
+ */
+ function isConnectRetryExhausted ();
+
+ /**
+ * Do the shutdown sequence for this connection helper
+ *
+ * @todo We may want to implement a filter for ease notification of other objects like our pool
+ * @return void
+ * @throws SocketShutdownException If the current socket could not be shut down
+ */
+ function doShutdown ();
+}
+
+// [EOF]
+?>
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+/**
+ * A factory class for fragmenter
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 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 <http://www.gnu.org/licenses/>.
+ */
+class FragmenterFactory extends ObjectFactory {
+ /**
+ * Protected constructor
+ *
+ * @return void
+ */
+ protected function __construct () {
+ // Call parent constructor
+ parent::__construct(__CLASS__);
+ }
+
+ /**
+ * Returns a singleton fragmenter instance. If no instance is found, it fill
+ * be generated and stored in registry, else the fragmenter from the
+ * registry will be returned.
+ *
+ * @param $configEntry A configuration entry naming the real class' name
+ * @return $fragmenterInstance A fragmenter instance
+ */
+ public static final function createFragmenterInstance ($configEntry) {
+ // If there is no fragmenter?
+ if (Registry::getRegistry()->instanceExists('fragmenter')) {
+ // Get fragmenter from registry
+ $fragmenterInstance = Registry::getRegistry()->getInstance('fragmenter');
+ } else {
+ // Get the fragmenter instance
+ $fragmenterInstance = ObjectFactory::createObjectByConfiguredName($configEntry);
+
+ // Add it to the registry
+ Registry::getRegistry()->addInstance('fragmenter', $fragmenterInstance);
+ }
+
+ // Return the instance
+ return $fragmenterInstance;
+ }
+}
+
+// [EOF]
+?>
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+/**
+ * A factory class for producer
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 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 <http://www.gnu.org/licenses/>.
+ */
+class FragmenterFactory extends ObjectFactory {
+ /**
+ * Protected constructor
+ *
+ * @return void
+ */
+ protected function __construct () {
+ // Call parent constructor
+ parent::__construct(__CLASS__);
+ }
+
+ /**
+ * Returns a singleton producer instance. If no instance is found, it fill
+ * be generated and stored in registry, else the producer from the
+ * registry will be returned.
+ *
+ * @param $configEntry A configuration entry naming the real class' name
+ * @parasm $producerType Type of the producer, can be 'key', 'test_unit', etc.
+ * @return $producerInstance A producer instance
+ */
+ public static final function createProducerInstance ($configEntry, $producerType) {
+ // If there is no producer?
+ if (Registry::getRegistry()->instanceExists($producerType . '_producer')) {
+ // Get producer from registry
+ $producerInstance = Registry::getRegistry()->getInstance($producerType . '_producer');
+ } else {
+ // Get the producer instance
+ $producerInstance = ObjectFactory::createObjectByConfiguredName($configEntry);
+
+ // Add it to the registry
+ Registry::getRegistry()->addInstance($producerType . '_producer', $producerInstance);
+ }
+
+ // Return the instance
+ return $producerInstance;
+ }
+}
+
+// [EOF]
+?>
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
class BaseNetworkPackageHandler extends BaseHandler {
- // Error codes
- const SOCKET_ERROR_UNKNOWN = 'unknown_error';
- const SOCKET_ERROR_TRANSPORT_ENDPOINT = 'transport_endpoint';
- const SOCKET_ERROR_UNHANDLED = 'unhandled_package';
- const SOCKET_ERROR_EMPTY_DATA = 'empty_data';
- const PACKAGE_ERROR_INVALID_DATA = 'invalid_data';
- const PACKAGE_ERROR_INCOMPLETE_DATA = 'incomplete_data';
- const PACKAGE_ERROR_INVALID_CONTENT = 'invalid_content';
- const PACKAGE_ERROR_RECIPIENT_MISMATCH = 'recipient_error';
- const PACKAGE_LEVEL_CHECK_OKAY = 'checked_package';
+ // Error codes:
+ // - Socket raw data stream errors
+ const SOCKET_ERROR_UNKNOWN = 'unknown_error'; // Unknown error (should not happen)
+ const SOCKET_ERROR_TRANSPORT_ENDPOINT = 'transport_endpoint'; // Transport endpoint has closed
+ const SOCKET_ERROR_EMPTY_DATA = 'empty_data'; // Other peer has sent nothing
+ const SOCKET_ERROR_INVALID_BASE64_MODULO = 'base64_modulo'; // Length is not modulo 4
+ const SOCKET_ERROR_INVALID_BASE64_MESSAGE = 'base64_message'; // Raw data is not Base64-encoded
+ const SOCKET_ERROR_UNHANDLED = 'unhandled_package'; // Unhandled raw data (not bad)
+
+ // - Package errors
+ const PACKAGE_ERROR_INVALID_DATA = 'invalid_data'; // Invalid data in package found
+ const PACKAGE_ERROR_INCOMPLETE_DATA = 'incomplete_data'; // Incomplete data sent (e.g. field is missing)
+ const PACKAGE_ERROR_INVALID_CONTENT = 'invalid_content'; // Content is invalid (e.g. not well-formed)
+ const PACKAGE_ERROR_RECIPIENT_MISMATCH = 'recipient_error'; // Recipient is not us
+ const PACKAGE_LEVEL_CHECK_OKAY = 'checked_package'; // Package is fine
/**
* Error code from socket
protected function __construct ($className) {
// Call parent constructor
parent::__construct($className);
+
+ // Get an input stream instance
+ $streamInstance = ObjectFactory::createObjectByConfiguredName('node_raw_data_input_stream_class', array($this));
+
+ // Set it in this network-package handler
+ $this->setInputStreamInstance($streamInstance);
}
/**
// Get new instance
$handlerInstance = new TcpNetworkPackageHandler();
- // Initialize new resolver instance
- $resolverInstance = ObjectFactory::createObjectByConfiguredName('network_state_resolver_class');
-
- // Set it in this class
- $handlerInstance->setResolverInstance($resolverInstance);
-
// Return the prepared instance
return $handlerInstance;
}
/**
- * Processes a package from given resource. This is mostly useful for TCP
+ * Processes raw data from given resource. This is mostly useful for TCP
* package handling and is implemented in the TcpListener class
*
* @param $resource A valid resource identifier
* @return void
- * @todo We need to handle the raw data over to the NetworkPackage class if the state if fine
*/
- public function processResourcePackage ($resource) {
+ public function processResourceRawData ($resource) {
// Check the resource
if (!is_resource($resource)) {
// Throw an exception
throw new InvalidResourceException($this, self::EXCEPTION_INVALID_RESOURCE);
} // END - if
- // Init package data array
- $packageData = array();
-
// Reset error code to unhandled
$this->setErrorCode(self::SOCKET_ERROR_UNHANDLED);
// Debug message
- $this->debugOutput('HANDLER: Handling TCP package from peer ' . $resource);
+ //* NOISY-DEBUG: */ $this->debugOutput('HANDLER: Handling TCP package from peer ' . $resource);
- // Read the raw data from socket
+ /*
+ * Read the raw data from socket. If you change PHP_BINARY_READ to
+ * PHP_NORMAL_READ, this line will endless block. We only have
+ * simultanous threads and no real threads.
+ */
$rawData = socket_read($resource, $this->getConfigInstance()->getConfigEntry('tcp_buffer_length'), PHP_BINARY_READ);
// Debug output of read data length
- $this->debugOutput('rawData[]=' . strlen($rawData));
+ //* NOISY-DEBUG: */ $this->debugOutput('LISTENER: rawData[]=' . strlen($rawData));
// Is it valid?
if (($rawData === false) || (socket_last_error($resource) > 0)) {
} elseif (empty($rawData)) {
// The peer did send nothing to us
$this->setErrorCode(self::SOCKET_ERROR_EMPTY_DATA);
- }
+ } else {
+ // Low-level checks of the raw data went all fine, we can now decode the raw data
+ $decodedData = $this->getInputStreamInstance()->streamData($rawData);
- // Get a state from the resolver for this package data array
- $stateInstance = $this->getResolverInstance()->resolveStateByPackage($this, $packageData, $resource);
- die('UNFINISHED:'.$stateInstance->__toString()."\n");
+ // Is the decoded data false, then streamData() could not validate it
+ if ($decodedData !== false) {
+ die('decodedData(' . strlen($decodedData) . ')=' . $decodedData . "\n");
+ } // END - if
+ }
}
}
}
/**
- * Processes a package from given resource. This is mostly useful for TCP
+ * Processes raw data from given resource. This is mostly useful for TCP
* package handling and is implemented in the TcpListener class
*
* @param $resource A valid resource identifier
* @throws InvalidResourceException If the given resource is invalid
* @todo 0%
*/
- public function processResourcePackage ($resource) {
+ public function processResourceRawData ($resource) {
// Check the resource
if (!is_resource($resource)) {
// Throw an exception
} // END - if
// Implement processing here
- $this->partialStub('Please implement this method.');
+ $this->partialStub('Please implement this method. resource=' . $resource);
}
}
--- /dev/null
+<?php
+/**
+ * A ??? connection helper class
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2011 Core Developer Team
+ * @license GNU GPL 3.0 or any newer version
+ * @link http://www.ship-simu.org
+ * @todo Find an interface for hub helper
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+class ???ConnectionHelper extends BaseConnectionHelper implements ConnectionHelper {
+ /**
+ * Protected constructor
+ *
+ * @return void
+ */
+ protected function __construct () {
+ // Call parent constructor
+ parent::__construct(__CLASS__);
+
+ // Set protocol
+ $this->setProtocol('!!!');
+ }
+
+ /**
+ * Creates a socket resource ("connection") for given recipient in package data
+ *
+ * @param $packageData Raw package data
+ * @return $socketResource Socket resource
+ */
+ public static function createConnectionFromPackageData (array $packageData) {
+ die();
+ }
+}
+
+// [EOF]
+?>
// Register this connection helper
Registry::getRegistry()->addInstance('connection', $this);
+
+ // Initialize output stream
+ $streamInstance = ObjectFactory::createObjectByConfiguredName('node_raw_data_output_stream_class');
+
+ // And add it to this connection helper
+ $this->setOutputStreamInstance($streamInstance);
}
/**
* @return $chunkData Raw data chunk
*/
private function getRawDataFromPackageArray (array $packageData) {
- // If there is no fragmenter?
- if (!Registry::getRegistry()->instanceExists('package_fragmenter')) {
- // Get the fragmenter instance
- $fragmenterInstance = ObjectFactory::createObjectByConfiguredName('package_fragmenter_class');
-
- // Add it to the registry
- Registry::getRegistry()->addInstance('package_fragmenter', $fragmenterInstance);
- } else {
- // Get fragmenter from registry
- $fragmenterInstance = Registry::getRegistry()->getInstance('package_fragmenter');
- }
+ // Get the fragmenter instance
+ $fragmenterInstance = FragmenterFactory::createFragmenterInstance('package_fragmenter_class');
// Implode the package data array and fragement the resulting string, returns the final hash
$finalHash = $fragmenterInstance->fragmentPackageArray($packageData, $this);
$bufferSize = $this->getConfigInstance()->getConfigEntry($this->getProtocol() . '_buffer_length');
// Init variables
- $rawData = '';
- $dataStream = ' ';
+ $rawData = '';
+ $dataStream = ' ';
$totalSentBytes = 0;
// Fill sending buffer with data
// Nothing to sent is bad news!
assert(strlen($rawData) > 0);
+ // Encode the raw data with our output-stream
+ $encodedData = $this->getOutputStreamInstance()->streamData($rawData);
+
// Calculate difference
- $this->diff = $bufferSize - strlen($rawData);
+ $this->diff = $bufferSize - strlen($encodedData);
// Get socket resource
$socketResource = $this->getSocketResource();
// Deliver all data
while ($sentBytes !== false) {
// And deliver it
- //* NOISY-DEBUG: */ $this->debugOutput('CONNECTION: Sending out ' . strlen($rawData) . ' bytes,bufferSize=' . $bufferSize . ',diff=' . $this->diff);
- $sentBytes = @socket_write($socketResource, $rawData, ($bufferSize - $this->diff));
+ //* NOISY-DEBUG: */ $this->debugOutput('CONNECTION: Sending out ' . strlen($encodedData) . ' bytes,bufferSize=' . $bufferSize . ',diff=' . $this->diff);
+ $sentBytes = @socket_write($socketResource, $encodedData, ($bufferSize - $this->diff));
// If there was an error, we don't continue here
if ($sentBytes === false) {
// And throw it
throw new InvalidSocketException(array($this, gettype($socketResource), $socketError, $errorMessage), BaseListener::EXCEPTION_INVALID_SOCKET);
- } elseif (($sentBytes == 0) && (strlen($rawData) > 0)) {
+ } elseif (($sentBytes == 0) && (strlen($encodedData) > 0)) {
// Nothing sent means we are done
//* NOISY-DEBUG: */ $this->debugOutput('CONNECTION: All sent! (' . __LINE__ . ')');
break;
}
// The difference between sent bytes and length of raw data should not be below zero
- assert((strlen($rawData) - $sentBytes) >= 0);
+ assert((strlen($encodedData) - $sentBytes) >= 0);
// Add total sent bytes
$totalSentBytes += $sentBytes;
// Cut out the last unsent bytes
- //* NOISY-DEBUG: */ $this->debugOutput('CONNECTION: Sent out ' . $sentBytes . ' of ' . strlen($rawData) . ' bytes ...');
- $rawData = substr($rawData, $sentBytes);
+ //* NOISY-DEBUG: */ $this->debugOutput('CONNECTION: Sent out ' . $sentBytes . ' of ' . strlen($encodedData) . ' bytes ...');
+ $encodedData = substr($encodedData, $sentBytes);
// Calculate difference again
- $this->diff = $bufferSize - strlen($rawData);
+ $this->diff = $bufferSize - strlen($encodedData);
// Can we abort?
- if (strlen($rawData) <= 0) {
+ if (strlen($encodedData) <= 0) {
// Abort here, all sent!
//* NOISY-DEBUG: */ $this->debugOutput('CONNECTION: All sent! (' . __LINE__ . ')');
break;
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-class TcpConnectionHelper extends BaseConnectionHelper implements Helper {
+class TcpConnectionHelper extends BaseConnectionHelper implements ConnectionHelper {
/**
* Protected constructor
*
throw new InvalidSocketException(array($helperInstance, gettype($socketResource), $socketError, $errorMessage), BaseListener::EXCEPTION_INVALID_SOCKET);
} // END - if
- // Now, we want non-blocking mode
- if (!socket_set_nonblock($socketResource)) {
- // Get socket error code for verification
- $socketError = socket_last_error($socketResource);
-
- // Get error message
- $errorMessage = socket_strerror($socketError);
-
- // Shutdown this socket
- $helperInstance->shutdownSocket($socketResource);
-
- // And throw again
- throw new InvalidSocketException(array($helperInstance, gettype($socketResource), $socketError, $errorMessage), BaseListener::EXCEPTION_INVALID_SOCKET);
- } // END - if
-
// Set the resource
$helperInstance->setSocketResource($socketResource);
}
} // END - if
+ // Now, we want non-blocking mode
+ if (!socket_set_nonblock($socketResource)) {
+ // Get socket error code for verification
+ $socketError = socket_last_error($socketResource);
+
+ // Get error message
+ $errorMessage = socket_strerror($socketError);
+
+ // Shutdown this socket
+ $helperInstance->shutdownSocket($socketResource);
+
+ // And throw again
+ throw new InvalidSocketException(array($helperInstance, gettype($socketResource), $socketError, $errorMessage), BaseListener::EXCEPTION_INVALID_SOCKET);
+ } // END - if
+
// Okay, that should be it. So return it...
return $socketResource;
}
/**
- * Do the shutdown sequence for TCP connections
+ * Do the shutdown sequence for this connection helper
*
- * @todo We may want to implement a filter for ease notification of other objects like our pool
* @return void
* @throws SocketShutdownException If the current socket could not be shut down
+ * @todo We may want to implement a filter for ease notification of other objects like our pool
*/
public function doShutdown () {
// Clear any previous errors
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-class UdpConnectionHelper extends BaseConnectionHelper implements Helper {
+class UdpConnectionHelper extends BaseConnectionHelper implements ConnectionHelper {
/**
* Protected constructor
*
* @return $socketResource Socket resource
*/
public static function createConnectionFromPackageData (array $packageData) {
- die();
+ die(__METHOD__ . ': Unfinished method, packageData[]=' . count($packageData) . "\n");
+ }
+
+ /**
+ * Do the shutdown sequence for this connection helper
+ *
+ * @return void
+ * @throws SocketShutdownException If the current socket could not be shut down
+ * @todo We may want to implement a filter for ease notification of other objects like our pool
+ */
+ public function doShutdown () {
+ $this->partialStub('Please implement this method.');
}
}
if ($currentSocket != $this->getSocketResource()) {
// ... or else it will raise warnings like 'Transport endpoint is not connected'
//* NOISY-DEBUG: */ $this->debugOutput('LISTENER: currentSocket=' . $currentSocket);
- $this->getPackageInstance()->processResourcePackage($currentSocket);
+ $this->getPackageInstance()->processResourceRawData($currentSocket);
} // END - if
// Advance to next entry. This should be the last line
*/
const PACKAGE_MASK_SEPERATOR = ':';
+ /**
+ * Seperator for checksum
+ */
+ const PACKAGE_CHECKSUM_SEPERATOR = ':';
+
/**
* Array indexes for above mask, start with zero
*/
* @param $helperInstance An instance of a BaseHubHelper class
* @param $nodeInstance An instance of a NodeHelper class
* @return $hash Hash for given package content
+ * @todo $helperInstance is unused
*/
private function getHashFromContent ($content, BaseHubHelper $helperInstance, NodeHelper $nodeInstance) {
// Create the hash
- // @TODO crc32 is not good, but it needs to be fast
+ // @TODO crc32 is not very strong, but it needs to be fast
$hash = crc32(
$content .
- ':' .
+ self::PACKAGE_CHECKSUM_SEPERATOR .
$nodeInstance->getSessionId() .
- ':' .
+ self::PACKAGE_CHECKSUM_SEPERATOR .
$this->getCompressorInstance()->getCompressorExtension()
);
<?php
/**
* A PackageFragmenter class to fragment package data into smaller chunks for
- * delivery. This class does add a serial number to it and in the first data
- * submission chunk it will add a sumerization of all fragements and their
- * serial numbers.
+ * delivery. This class calculates a final hash on the raw input data and
+ * fragments the data into smaller chunks after it has been encoded by a
+ * "outgoing encoding stream".
+ *
+ * All chunks are extended with a hash and a serial number to make it later
+ * easier to verify them and put them back in the right order and to, if
+ * required, request a re-delivery of an invalid chunk (e.g. hash didn't match).
+ * Also an "end-of-package" marker is being added as the last chunk to mark the
+ * end of of the whole package submission.
*
* @author Roland Haeder <webmaster@ship-simu.org>
* @version 0.0.0
* Maximum possible serial number
*/
private $maxSerialNumber = 0;
+
/**
* Seperator between chunk data, serial number and chunk hash
*/
*/
const CHUNK_HASH_SEPERATOR = ';';
+ /**
+ * Seperator between two chunks
+ */
+ const CHUNK_SEPERATOR = '|';
+
/**
* Identifier for hash chunk
*/
const HASH_CHUNK_IDENTIFIER = 'HASH-CHUNK:';
+ /**
+ * Identifier for end-of-package marker
+ */
+ const END_OF_PACKAGE_IDENTIFIER = 'EOP:';
+
/**
* Protected constructor
*
// Get new instance
$fragmenterInstance = new PackageFragmenter();
- // Get an output stream for all out-going packages
- $streamInstance = ObjectFactory::createObjectByConfiguredName('node_raw_package_output_stream');
-
- // And set it in this fragmenter
- $fragmenterInstance->setOutputStreamInstance($streamInstance);
-
// And also a crypto instance (for our encrypted messages)
$cryptoInstance = ObjectFactory::createObjectByConfiguredName('crypto_class');
$fragmenterInstance->setCryptoInstance($cryptoInstance);
return $encodedSerialNumber;
}
+ /**
+ * Appends an end-of-package chunk to the chunk list for given chunk and
+ * final hash.
+ *
+ * @param $chunkHash Last chunk's hash
+ * @param $finalHash Final hash for raw (unencoded) data
+ * @return void
+ */
+ private function appendEndOfPackageChunk ($chunkHash, $finalHash) {
+ // Generate end-of-package marker
+ $rawData =
+ self::END_OF_PACKAGE_IDENTIFIER .
+ $finalHash . self::CHUNK_HASH_SEPERATOR .
+ $chunkHash . self::CHUNK_SEPERATOR;
+
+ // Also get a hash from it
+ $chunkHash = $this->generateHashFromRawData($rawData);
+
+ // Append it to the chunk's data and hash array
+ $this->chunkHashes[$finalHash][] = $chunkHash;
+ $this->chunks[$finalHash][] = $rawData;
+ }
+
/**
* Splits the given encoded data into smaller chunks, the size of the final
* and the seperator is being subtracted from chunk size to fit it into a
* TCP package (512 bytes).
*
- * @param $encodedData Encoded data string
- * @param $finalHash Final hash from the raw data
+ * @param $rawData Raw data string
+ * @param $finalHash Final hash from the raw data
* @return void
*/
- private function splitEncodedDataIntoChunks ($encodedData, $finalHash) {
+ private function splitEncodedDataIntoChunks ($rawData, $finalHash) {
// Make sure final hashes with at least 32 bytes can pass
assert(strlen($finalHash) >= 32);
$dataChunkSize = $this->getDataChunkSizeFromHash($finalHash);
//* NOISY-DEBUG: */ $this->debugOutput('FRAGMENTER: dataChunkSize=' . $dataChunkSize);
+ // Init variables
+ $chunkHash = '';
+
// Now split it up
- for ($idx = 0; $idx < strlen($encodedData); $idx += $dataChunkSize) {
+ for ($idx = 0; $idx < strlen($rawData); $idx += $dataChunkSize) {
// Get the next chunk
- $chunk = substr($encodedData, $idx, $dataChunkSize);
+ $chunk = substr($rawData, $idx, $dataChunkSize);
// Hash it and remember it in seperate array
$chunkHash = $this->getCryptoInstance()->hashString($chunk);
$this->chunkHashes[$finalHash][] = $chunkHash;
// Prepend the hash to the chunk
- $chunk = $chunkHash . self::CHUNK_DATA_HASH_SEPERATOR . $this->getNextHexSerialNumber() . self::CHUNK_DATA_HASH_SEPERATOR . $chunk;
+ $chunk =
+ $chunkHash . self::CHUNK_DATA_HASH_SEPERATOR .
+ $this->getNextHexSerialNumber() . self::CHUNK_DATA_HASH_SEPERATOR .
+ $chunk . self::CHUNK_SEPERATOR
+ ;
// Make sure the chunk is not larger than a TCP package can hold
assert(strlen($chunk) <= NetworkPackage::TCP_PACKAGE_SIZE);
} // END - for
// Debug output
- $this->debugOutput('FRAGMENTER: Encoded data of ' . strlen($encodedData) . ' bytes has been fragmented into ' . count($this->chunks[$finalHash]) . ' chunk(s).');
+ //* NOISY-DEBUG: */ $this->debugOutput('FRAGMENTER: Raw data of ' . strlen($rawData) . ' bytes has been fragmented into ' . count($this->chunks[$finalHash]) . ' chunk(s).');
+
+ // Add end-of-package chunk
+ $this->appendEndOfPackageChunk($chunkHash, $finalHash);
}
/**
* Prepends a chunk (or more) with all hashes from all chunks + final chunk.
*
- * @param $encodedData Encoded data string
- * @param $finalHash Final hash from the raw data
+ * @param $rawData Raw data string
+ * @param $finalHash Final hash from the raw data
* @return void
*/
- private function prependHashChunk ($encodedData, $finalHash) {
+ private function prependHashChunk ($rawData, $finalHash) {
// "Implode" the whole array of hashes into one string
$rawData = self::HASH_CHUNK_IDENTIFIER . implode(self::CHUNK_HASH_SEPERATOR, $this->chunkHashes[$finalHash]);
// Also get a hash from it
$chunkHash = $this->generateHashFromRawData($rawData);
- // Also encode this one
- $encodedData = $this->getOutputStreamInstance()->streamData($rawData);
-
// Calulcate chunk size
$dataChunkSize = $this->getDataChunkSizeFromHash($chunkHash);
// Now array_unshift() it to the two chunk arrays
- for ($idx = 0; $idx < strlen($encodedData); $idx += $dataChunkSize) {
+ for ($idx = 0; $idx < strlen($rawData); $idx += $dataChunkSize) {
// Get the next chunk
- $chunk = substr($encodedData, $idx, $dataChunkSize);
+ $chunk = substr($rawData, $idx, $dataChunkSize);
// Hash it and remember it in seperate array
$chunkHash = $this->getCryptoInstance()->hashString($chunk);
array_unshift($this->chunkHashes[$finalHash], $chunkHash);
// Prepend the hash to the chunk
- $chunk = $chunkHash . self::CHUNK_DATA_HASH_SEPERATOR . $this->getNextHexSerialNumber() . self::CHUNK_DATA_HASH_SEPERATOR . $chunk;
+ $chunk =
+ $chunkHash . self::CHUNK_DATA_HASH_SEPERATOR .
+ $this->getNextHexSerialNumber() . self::CHUNK_DATA_HASH_SEPERATOR .
+ $chunk . self::CHUNK_SEPERATOR
+ ;
// Make sure the chunk is not larger than a TCP package can hold
assert(strlen($chunk) <= NetworkPackage::TCP_PACKAGE_SIZE);
// Init pointer
$this->initPointer($finalHash);
- // Encode the package for delivery
- $encodedData = $this->getOutputStreamInstance()->streamData($rawData);
-
// Split the encoded data into smaller chunks
- $this->splitEncodedDataIntoChunks($encodedData, $finalHash);
+ $this->splitEncodedDataIntoChunks($rawData, $finalHash);
// Prepend a chunk with all hashes together
- $this->prependHashChunk($encodedData, $finalHash);
+ $this->prependHashChunk($rawData, $finalHash);
// Mark the package as fragmented
$this->markPackageDataProcessed($packageData);
<?php
-/**
- * A PackageInputStream class
- *
- * @author Roland Haeder <webmaster@ship-simu.org>
- * @version 0.0.0
- * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 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 <http://www.gnu.org/licenses/>.
- */
-class PackageInputStream extends BaseStream implements InputStreamable {
- /**
- * Protected constructor
- *
- * @return void
- */
- protected function __construct () {
- // Call parent constructor
- parent::__construct(__CLASS__);
- }
-
- /**
- * Creates an instance of this node class
- *
- * @return $streamInstance An instance of this node class
- */
- public final static function createPackageInputStream () {
- // Get a new instance
- $streamInstance = new PackageInputStream();
-
- // Return the instance
- return $streamInstance;
- }
-
- /**
- * Streams the data and maybe does something to it
- *
- * @param $data The data (string mostly) to "stream"
- * @return $data The data (string mostly) to "stream"
- * @todo Do we need to do something more here?
- */
- public function streamData ($data) {
- // Encode the data with BASE64 encoding
- $data = base64_decode($data);
-
- // Return it
- return $data;
- }
-}
-
-// [EOF]
+// @DEPRECATED
?>
<?php
-/**
- * A PackageOutputStream class
- *
- * @author Roland Haeder <webmaster@ship-simu.org>
- * @version 0.0.0
- * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 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 <http://www.gnu.org/licenses/>.
- */
-class PackageOutputStream extends BaseStream implements OutputStreamable {
- /**
- * Protected constructor
- *
- * @return void
- */
- protected function __construct () {
- // Call parent constructor
- parent::__construct(__CLASS__);
- }
-
- /**
- * Creates an instance of this node class
- *
- * @return $streamInstance An instance of this node class
- */
- public final static function createPackageOutputStream () {
- // Get a new instance
- $streamInstance = new PackageOutputStream();
-
- // Return the instance
- return $streamInstance;
- }
-
- /**
- * Streams the data and maybe does something to it
- *
- * @param $data The data (string mostly) to "stream"
- * @return $data The data (string mostly) to "stream"
- * @todo Do we need to do something more here?
- */
- public function streamData ($data) {
- // Encode the data with BASE64 encoding
- $data = base64_encode($data);
-
- // Return it
- return $data;
- }
-}
-
-// [EOF]
+// @DEPRECATED
?>
--- /dev/null
+Deny from all
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+/**
+ * A RawDataInputStream class
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 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 <http://www.gnu.org/licenses/>.
+ */
+class RawDataInputStream extends BaseStream implements InputStreamable {
+ /**
+ * Protected constructor
+ *
+ * @return void
+ */
+ protected function __construct () {
+ // Call parent constructor
+ parent::__construct(__CLASS__);
+ }
+
+ /**
+ * Creates an instance of this node class
+ *
+ * @param $handlerInstance An instance of a Networkable class
+ * @return $streamInstance An instance of this node class
+ */
+ public final static function createRawDataInputStream (Networkable $handlerInstance) {
+ // Get a new instance
+ $streamInstance = new RawDataInputStream();
+
+ // Set the handler instance
+ $streamInstance->setHandlerInstance($handlerInstance);
+
+ // Return the instance
+ return $streamInstance;
+ }
+
+ /**
+ * Streams the data and maybe does something to it
+ *
+ * @param $data The data (string mostly) to "stream"
+ * @return $data The data (string mostly) to "stream"
+ * @todo Do we need to do something more here?
+ */
+ public function streamData ($data) {
+ // Can it be validated?
+ if ((strlen($data) % 4) != 0) {
+ // Length modulo 4 must be zero, else it is an invalid Base64 message
+ $this->getHandlerInstance()->setErrorCode(BaseNetworkPackageHandler::SOCKET_ERROR_INVALID_BASE64_MODULO);
+ $data = false;
+ } elseif (!$this->isBase64Encoded($data)) {
+ // Is not a valid Base64-encoded message
+ $this->getHandlerInstance()->setErrorCode(BaseNetworkPackageHandler::SOCKET_ERROR_INVALID_BASE64_MESSAGE);
+ $data = false;
+ } else {
+ // Decode the data with BASE64-encoding
+ $data = base64_decode($data);
+ }
+
+ // Return it
+ return $data;
+ }
+}
+
+// [EOF]
+?>
--- /dev/null
+Deny from all
--- /dev/null
+<?php
+/**
+ * A RawDataOutputStream class
+ *
+ * @author Roland Haeder <webmaster@ship-simu.org>
+ * @version 0.0.0
+ * @copyright Copyright (c) 2007, 2008 Roland Haeder, 2009 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 <http://www.gnu.org/licenses/>.
+ */
+class RawDataOutputStream extends BaseStream implements OutputStreamable {
+ /**
+ * Protected constructor
+ *
+ * @return void
+ */
+ protected function __construct () {
+ // Call parent constructor
+ parent::__construct(__CLASS__);
+ }
+
+ /**
+ * Creates an instance of this node class
+ *
+ * @return $streamInstance An instance of this node class
+ */
+ public final static function createRawDataOutputStream () {
+ // Get a new instance
+ $streamInstance = new RawDataOutputStream();
+
+ // Return the instance
+ return $streamInstance;
+ }
+
+ /**
+ * Streams the data and maybe does something to it
+ *
+ * @param $data The data (string mostly) to "stream"
+ * @return $data The data (string mostly) to "stream"
+ * @todo Do we need to do something more here?
+ */
+ public function streamData ($data) {
+ // Encode the data with BASE64 encoding
+ $data = base64_encode($data);
+
+ // Return it
+ return $data;
+ }
+}
+
+// [EOF]
+?>
* @return void
*/
public function executeTask () {
- // First we check if we already have an instance (which will happen at any later cyclus)
- if (!Registry::getRegistry()->instanceExists('key_producer')) {
- // No instance found, so we need to create a producer instance
- $producerInstance = ObjectFactory::createObjectByConfiguredName('cruncher_key_producer_class');
-
- // ... and add it to the registry
- Registry::getRegistry()->addInstance('key_producer', $producerInstance);
- } else {
- // Get the producer instance from registry
- $producerInstance = Registry::getRegistry()->getInstance('key_producer');
- }
+ // Get the instance
+ $producerInstance = ProducerFactory::createProducerInstance('cruncher_key_producer_class', 'key');
// Get the current cruncher state from registry
$stateInstance = Registry::getRegistry()->getInstance('cruncher')->getStateInstance();
* @return void
*/
public function executeTask () {
- // First we check if we already have an instance (which will happen at any later cyclus)
- if (!Registry::getRegistry()->instanceExists('test_unit_producer')) {
- // No instance found, so we need to create a producer instance
- $producerInstance = ObjectFactory::createObjectByConfiguredName('cruncher_test_unit_producer_class');
-
- // ... and add it to the registry
- Registry::getRegistry()->addInstance('test_unit_producer', $producerInstance);
- } else {
- // Get the producer instance from registry
- $producerInstance = Registry::getRegistry()->getInstance('test_unit_producer');
- }
+ // Get the producer instance
+ $producerInstance = ProducerFactory::createProducerInstance('cruncher_test_unit_producer_class', 'test_unit');
// Get the current cruncher state from registry
$stateInstance = Registry::getRegistry()->getInstance('cruncher')->getStateInstance();
### WARNING: THIS FILE IS AUTO-GENERATED BY ./todo-builder.sh ###
### DO NOT EDIT THIS FILE. ###
./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:44: * @todo We may want to implement a filter for ease notification of other objects like our pool
./application/hub/interfaces/nodes/class_NodeHelper.php:10: * @todo We need to find a better name for this interface
./application/hub/main/commands/console/class_HubConsoleCruncherCommand.php:104: * @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/filter/shutdown/node/class_NodeShutdownTaskHandlerFilter.php:55: * @todo 0% done
./application/hub/main/filter/task/cruncher/class_CruncherTaskHandlerInitializerFilter.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/network/tcp/class_TcpNetworkPackageHandler.php:96: * @todo ~10% done
./application/hub/main/handler/network/udp/class_UdpNetworkPackageHandler.php:58: * @todo 0%
./application/hub/main/handler/tasks/class_TaskHandler.php:140: // @TODO Messurement can be added around this call
./application/hub/main/helper/connection/tcp/class_TcpConnectionHelper.php:10: * @todo Find an interface for hub helper
-./application/hub/main/helper/connection/tcp/class_TcpConnectionHelper.php:139: * @todo We may want to implement a filter for ease notification of other objects like our pool
+./application/hub/main/helper/connection/tcp/class_TcpConnectionHelper.php:141: * @todo We may want to implement a filter for ease notification of other objects like our pool
./application/hub/main/helper/connection/udp/class_UdpConnectionHelper.php:10: * @todo Find an interface for hub helper
+./application/hub/main/helper/connection/udp/class_UdpConnectionHelper.php:54: * @todo We may want to implement a filter for ease notification of other objects like our pool
./application/hub/main/helper/hub/announcement/class_HubDescriptorHelper.php:10: * @todo Find an interface for hub helper
./application/hub/main/helper/hub/announcement/class_HubDescriptorHelper.php:61: * @todo Rewrite the ->renderXmlContent() call to no arguments
./application/hub/main/helper/hub/connection/class_HubSelfConnectHelper.php:10: * @todo Find an interface for hub helper
./application/hub/main/nodes/regular/class_HubRegularNode.php:58: * @todo Implement this method
./application/hub/main/nodes/regular/class_HubRegularNode.php:68: * @todo Unfinished method
./application/hub/main/nodes/regular/class_HubRegularNode.php:91: // @TODO Add some filters here
-./application/hub/main/package/class_NetworkPackage.php:152: // @TODO crc32 is not good, but it needs to be fast
-./application/hub/main/package/class_NetworkPackage.php:22: * @todo Needs to add functionality for handling the object's type
-./application/hub/main/package/class_NetworkPackage.php:264: // @TODO We may want to do somthing more here?
-./application/hub/main/package/class_NetworkPackage.php:363: // @TODO Add some logging here
-./application/hub/main/package/class_NetworkPackage.php:389: // @TODO Add some logging here
+./application/hub/main/package/class_NetworkPackage.php:160: * @todo $helperInstance is unused
+./application/hub/main/package/class_NetworkPackage.php:164: // @TODO crc32 is not very strong, but it needs to be fast
+./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:280: // @TODO We may want to do somthing more here?
+./application/hub/main/package/class_NetworkPackage.php:379: // @TODO Add some logging here
+./application/hub/main/package/class_NetworkPackage.php:405: // @TODO Add some logging here
+./application/hub/main/package/class_NetworkPackage.php:460: // @TODO Add some content here
+./application/hub/main/package/class_NetworkPackage.php:469: // @TODO Add some content here
+./application/hub/main/package/fragmenter/class_PackageFragmenter.php:426: * @todo $connectionInstance is unused
./application/hub/main/pools/peer/class_DefaultPeerPool.php:148: // @TODO Check for IP
./application/hub/main/producer/cruncher/keys/class_CruncherKeyProducer.php:106: // @TODO Do something with it
./application/hub/main/producer/cruncher/keys/class_CruncherKeyProducer.php:62: * @todo Find something for init phase of this key producer
./application/hub/main/resolver/state/network/class_NetworkStateResolver.php:68: * @todo ~30% done
./application/hub/main/resolver/state/network/class_NetworkStateResolver.php:80: // @TODO On some systems it is 134, on some 107?
./application/hub/main/states/node/init/class_NodeInitState.php:63: * @todo We might want to move some calls to this method to fill it with life
+./application/hub/main/streams/raw_data/input/class_RawDataInputStream.php:57: * @todo Do we need to do something more here?
+./application/hub/main/streams/raw_data/output/class_RawDataOutputStream.php:53: * @todo Do we need to do something more here?
./application/hub/main/tasks/cruncher/class_CruncherKeyProducerTask.php:53: * @todo Maybe visit some sub-objects
./application/hub/main/tasks/cruncher/class_CruncherTestUnitProducerTask.php:53: * @todo Maybe visit some sub-objects
./application/hub/main/tasks/cruncher/class_CruncherWorkUnitFetcherTask.php:54: * @todo Maybe visit some sub-objects
./application/hub/main/tasks/hub/announcement/class_HubSelfAnnouncementTask.php:53: * @todo 0%
./application/hub/main/tasks/hub/class_HubSelfConnectTask.php:53: * @todo 0%
+./application/hub/main/tasks/hub/class_HubSocketListenerTask.php:62: // @TODO Do we need to visit this task? $visitorInstance->visitTask($this);
+./application/hub/main/tasks/hub/class_HubSocketListenerTask.php:69: * @todo 0% done
./application/hub/main/tasks/hub/ping/class_HubPingTask.php:73: * @todo 0% done
./application/hub/main/tasks/hub/update/class_HubUpdateCheckTask.php:53: * @todo 0%
./application/hub/main/template/announcement/class_XmlAnnouncementTemplateEngine.php:10: * @todo This template engine does not make use of setTemplateType()
./inc/classes/exceptions/main/class_MissingMethodException.php:13: * @todo Try to rewrite user/guest login classes and mark this exception as deprecated
./inc/classes/exceptions/main/class_NoConfigEntryException.php:10: * @todo Rename this class to NoFoundEntryException
./inc/classes/interfaces/class_FrameworkInterface.php:11: * @todo Find a better name for this interface
-./inc/classes/main/class_BaseFrameworkSystem.php:1237: * @todo Write a logging mechanism for productive mode
-./inc/classes/main/class_BaseFrameworkSystem.php:1251: // @TODO Finish this part!
-./inc/classes/main/class_BaseFrameworkSystem.php:169: // @todo Try to clean these constants up
-./inc/classes/main/class_BaseFrameworkSystem.php:408: * @todo SearchableResult and UpdateableResult shall have a super interface to use here
+./inc/classes/main/class_BaseFrameworkSystem.php:1253: * @todo Write a logging mechanism for productive mode
+./inc/classes/main/class_BaseFrameworkSystem.php:1267: // @TODO Finish this part!
+./inc/classes/main/class_BaseFrameworkSystem.php:185: // @todo Try to clean these constants up
+./inc/classes/main/class_BaseFrameworkSystem.php:424: * @todo SearchableResult and UpdateableResult shall have a super interface to use here
./inc/classes/main/commands/web/class_WebLoginAreaCommand.php:64: * @todo Add some stuff here: Some personal data, app/game related data
./inc/classes/main/commands/web/class_WebProblemCommand.php:58: * @todo 0% done
./inc/classes/main/commands/web/class_WebStatusCommand.php:58: * @todo 0% done
./application/hub/main/helper/messages/crypto/class_CryptoRandomMessageHelper.php:2:// @DEPRECATED
./application/hub/main/iterator/producer/class_TestUnitKeyProducerIterator.php:2:// @DEPRECATED
./application/hub/main/nodes/class_BaseHubNode.php:58: * @deprecated
+./application/hub/main/streams/package/input/class_PackageInputStream.php:2:// @DEPRECATED
+./application/hub/main/streams/package/output/class_PackageOutputStream.php:2:// @DEPRECATED
./application/hub/main/template/announcement/class_AnnouncementTemplateEngine.php:2:// @DEPRECATED
./application/hub/main/template/connect/class_SelfConnectTemplateEngine.php:2:// @DEPRECATED
./application/hub/main/template/objects/class_ObjectRegistryTemplateEngine.php:2:// @DEPRECATED
./inc/classes/exceptions/main/class_MissingMethodException.php:14: * @deprecated Please do no longer use this exception
./inc/classes/interfaces/helper/class_HelpableLogin.php:2:// @DEPRECATED
./inc/classes/interfaces/helper/class_HelpableTemplate.php:2:// @DEPRECATED
+./inc/classes/main/streams/input/class_BaseInputStream.php:2:// @DEPRECATED
+./inc/classes/main/streams/output/class_BaseOutputStream.php:2:// @DEPRECATED
./inc/classes.php:9: * @deprecated
./inc/database.php:10: * @deprecated
./inc/file_io.php:2:// @DEPRECATED