From cacbd34c6805904991845e9e15de907f22329641 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sat, 27 Mar 2010 15:19:33 +0000 Subject: [PATCH] Not thrown exceptions removed from doc-tag, TODOs added and updated --- .../tcp/class_TcpNetworkPackageHandler.php | 2 +- .../state/network/class_NetworkStateResolver.php | 12 ++++++------ docs/TODOs.txt | 15 ++++++++------- 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/application/hub/main/handler/network/tcp/class_TcpNetworkPackageHandler.php b/application/hub/main/handler/network/tcp/class_TcpNetworkPackageHandler.php index d2622d477..76832a6e1 100644 --- a/application/hub/main/handler/network/tcp/class_TcpNetworkPackageHandler.php +++ b/application/hub/main/handler/network/tcp/class_TcpNetworkPackageHandler.php @@ -58,7 +58,7 @@ class TcpNetworkPackageHandler extends BaseNetworkPackageHandler implements Netw * @param $resource A valid resource identifier * @return void * @throws InvalidResourceException If the given resource is invalid - * @todo 0% + * @todo ~10% done */ public function processResourcePackage ($resource) { // Check the resource diff --git a/application/hub/main/resolver/state/network/class_NetworkStateResolver.php b/application/hub/main/resolver/state/network/class_NetworkStateResolver.php index e37e8380f..925a37a05 100644 --- a/application/hub/main/resolver/state/network/class_NetworkStateResolver.php +++ b/application/hub/main/resolver/state/network/class_NetworkStateResolver.php @@ -48,9 +48,7 @@ class NetworkStateResolver extends BaseStateResolver implements StateResolver { /** * Creates an instance of a resolver class with a given state * - * @return $resolverInstance The prepared state resolver instance - * @throws EmptyVariableException Thrown if default state is not set - * @throws InvalidStateException Thrown if default state is invalid + * @return $resolverInstance The prepared state resolver instance */ public final static function createNetworkStateResolver () { // Create the new instance @@ -66,7 +64,7 @@ class NetworkStateResolver extends BaseStateResolver implements StateResolver { * @param $packageInstance An instance of a package class * @param $rawData The raw data * @return $stateInstance An instance of the resolved state - * @todo 0% + * @todo ~30% done */ public function resolveStateByPackage (Networkable $packageInstance, $rawData) { // Get error code @@ -79,13 +77,15 @@ class NetworkStateResolver extends BaseStateResolver implements StateResolver { $errorCode = BaseNetworkPackageHandler::SOCKET_ERROR_TRANSPORT_ENDPOINT; } elseif (is_int($errorCode)) { // Debug output (because we might want to handle it like the above(s) - $this->debugOutput(__METHOD__ . ': UNKNOWN ERROR CODE = ' . $errorCode); + $this->debugOutput(__METHOD__ . ': UNKNOWN ERROR CODE = ' . $errorCode, ', MESSAGE = ' . socket_strerror($errorCode)); // Change it only in this class $errorCode = BaseNetworkPackageHandler::SOCKET_ERROR_UNKNOWN; } // END - if - $this->partialStub('errorCode='.$errorCode.',rawData[] = '.gettype($rawData).'('.strlen($rawData).')'); + // @TODO We need to somehow detect the state/status of the remote peer and still maintain good speed. + // @TODO So maybe some pre-instancing of classes might help here to speedup this I/O intensive process. + $this->partialStub('errorCode=' . $errorCode . ',rawData[] = ' . gettype($rawData) . '(' . strlen($rawData) . ')'); } } diff --git a/docs/TODOs.txt b/docs/TODOs.txt index 906dc88ef..7d73c9d27 100644 --- a/docs/TODOs.txt +++ b/docs/TODOs.txt @@ -13,7 +13,7 @@ ./application/hub/main/filter/shutdown/class_HubShutdownFlushNodeListFilter.php:55: * @todo 0% done ./application/hub/main/filter/shutdown/class_HubShutdownTaskHandlerFilter.php:55: * @todo 0% done ./application/hub/main/filter/task/class_TaskHandlerInitializerFilter.php:55: * @todo 0% done -./application/hub/main/handler/network/tcp/class_TcpNetworkPackageHandler.php:61: * @todo 0% +./application/hub/main/handler/network/tcp/class_TcpNetworkPackageHandler.php:61: * @todo ~10% done ./application/hub/main/handler/network/udp/class_UdpNetworkPackageHandler.php:55: * @todo 0% ./application/hub/main/handler/tasks/class_TaskHandler.php:133: // @TODO Messurement can be added around this call ./application/hub/main/helper/hub/announcement/class_HubDescriptorHelper.php:10: * @todo Find an interface for hub helper @@ -31,10 +31,9 @@ ./application/hub/main/nodes/boot/class_HubBootNode.php:119: // @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/boot/class_HubBootNode.php:99: * @todo Unfinished method -./application/hub/main/nodes/class_BaseHubNode.php:407: * @todo Try to make this method more generic so we can move it in BaseFrameworkSystem -./application/hub/main/nodes/class_BaseHubNode.php:444: * @todo Change the first if() block to check for a specific state -./application/hub/main/nodes/class_BaseHubNode.php:582: // @TODO Add some criteria, e.g. if the node is active or so -./application/hub/main/nodes/class_BaseHubNode.php:611: // @TODO Add more states e.g. 'firewalled', 'senior' +./application/hub/main/nodes/class_BaseHubNode.php:412: * @todo Try to make this method more generic so we can move it in BaseFrameworkSystem +./application/hub/main/nodes/class_BaseHubNode.php:449: * @todo Change the first if() block to check for a specific state +./application/hub/main/nodes/class_BaseHubNode.php:587: // @TODO Add some criteria, e.g. if the node is active or so ./application/hub/main/nodes/list/class_HubListNode.php:58: * @todo Implement more bootstrap steps ./application/hub/main/nodes/list/class_HubListNode.php:68: * @todo Unfinished method ./application/hub/main/nodes/list/class_HubListNode.php:91: // @TODO Add some filters here @@ -46,8 +45,10 @@ ./application/hub/main/nodes/regular/class_HubRegularNode.php:91: // @TODO Add some filters here ./application/hub/main/package/class_NetworkPackage.php:103: crc32($content) // @TODO Not so good, but 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/resolver/state/network/class_NetworkStateResolver.php:69: * @todo 0% -./application/hub/main/resolver/state/network/class_NetworkStateResolver.php:78: // @TODO On some systems it is 134, on some 107? +./application/hub/main/resolver/state/network/class_NetworkStateResolver.php:67: * @todo ~30% done +./application/hub/main/resolver/state/network/class_NetworkStateResolver.php:76: // @TODO On some systems it is 134, on some 107? +./application/hub/main/resolver/state/network/class_NetworkStateResolver.php:86: // @TODO We need to somehow detect the state/status of the remote peer and still maintain good speed. +./application/hub/main/resolver/state/network/class_NetworkStateResolver.php:87: // @TODO So maybe some pre-instancing of classes might help here to speedup this I/O intensive process. ./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/ping/class_HubPingTask.php:63: * @todo 0% -- 2.39.5