]> git.mxchange.org Git - hub.git/commitdiff
Next wave:
authorRoland Häder <roland@mxchange.org>
Fri, 19 May 2017 17:29:00 +0000 (19:29 +0200)
committerRoland Häder <roland@mxchange.org>
Fri, 21 Aug 2020 16:50:02 +0000 (18:50 +0200)
- imported ConnectionHelper (now possible)
- imported UniversalNodeLocator
- imported SubRegistry
- imported Deliverable, Networkable, NetworkPackage
- imported SocketTag
- imported Poolable(Listener|Peer) instead of Poolable and used them
- added namespaces to configuration entries
- added PoolablePeer interface (from master branch)
- added PoolableListener interface (reborn!)
- created namespaces

Signed-off-by: Roland Häder <roland@mxchange.org>
63 files changed:
application/hub/classes/class_BaseHubSystem.php
application/hub/classes/container/socket/class_SocketContainer.php
application/hub/classes/database/frontend/node/class_NodeDistributedHashTableDatabaseWrapper.php
application/hub/classes/database/frontend/states/class_PeerStateLookupDatabaseWrapper.php
application/hub/classes/decoder/package/class_PackageDecoder.php
application/hub/classes/discovery/protocol/class_ProtocolDiscovery.php
application/hub/classes/discovery/recipient/package/class_PackageRecipientDiscovery.php
application/hub/classes/discovery/recipient/socket/class_PackageSocketDiscovery.php
application/hub/classes/factories/socket/class_SocketFactory.php
application/hub/classes/filter/class_BaseHubFilter.php
application/hub/classes/handler/network/socket/class_SocketRawDataHandler.php
application/hub/classes/handler/network/tcp/class_TcpRawDataHandler.php
application/hub/classes/handler/network/udp/class_UdpRawDataHandler.php
application/hub/classes/handler/protocol/class_BaseProtocolHandler.php
application/hub/classes/handler/protocol/ipv4/class_BaseIpV4ProtocolHandler.php
application/hub/classes/handler/raw_data/class_
application/hub/classes/handler/raw_data/class_BaseDataHandler.php
application/hub/classes/handler/raw_data/network/class_
application/hub/classes/handler/raw_data/network/class_BaseRawDataHandler.php
application/hub/classes/helper/class_
application/hub/classes/helper/connection/class_BaseConnectionHelper.php
application/hub/classes/helper/connection/ipv4/class_BaseIpV4ConnectionHelper.php
application/hub/classes/helper/connection/ipv4/tcp/class_TcpConnectionHelper.php
application/hub/classes/helper/dht/class_DhtBootstrapHelper.php
application/hub/classes/helper/dht/class_DhtPublishEntryHelper.php
application/hub/classes/helper/node/announcement/class_NodeAnnouncementHelper.php
application/hub/classes/helper/node/class_
application/hub/classes/helper/node/connection/class_NodeSelfConnectHelper.php
application/hub/classes/helper/node/requests/class_NodeRequestNodeListHelper.php
application/hub/classes/info/connection/class_ConnectionInfo.php
application/hub/classes/listener/class_BaseListener.php
application/hub/classes/listener/class_BaseListenerDecorator.php
application/hub/classes/nodes/class_BaseHubNode.php
application/hub/classes/package/assembler/class_PackageAssembler.php
application/hub/classes/package/class_NetworkPackage.php
application/hub/classes/package/fragmenter/class_PackageFragmenter.php
application/hub/classes/pools/listener/class_DefaultListenerPool.php
application/hub/classes/pools/peer/class_DefaultPeerPool.php
application/hub/classes/recipient/dht/class_DhtRecipient.php
application/hub/classes/recipient/direct/class_DirectRecipient.php
application/hub/classes/recipient/self/class_SelfRecipient.php
application/hub/classes/recipient/upper/class_UpperRecipient.php
application/hub/classes/registry/socket/class_SocketRegistry.php
application/hub/classes/tags/package/class_PackageTags.php
application/hub/classes/visitor/pool/monitor/class_RawDataPoolMonitorVisitor.php
application/hub/classes/visitor/socket/class_HalfShutdownSocketVisitor.php
application/hub/classes/visitor/socket/class_ShutdownSocketVisitor.php
application/hub/config.php
application/hub/exceptions/package/class_InvalidDataChecksumException.php
application/hub/exceptions/package/class_UnexpectedPackageStatusException.php
application/hub/exceptions/peer/class_PeerAlreadyRegisteredException.php
application/hub/exceptions/socket/class_SocketShutdownException.php
application/hub/exceptions/unl/class_InvalidUnlException.php
application/hub/interfaces/handler/network/class_Networkable.php
application/hub/interfaces/package/class_Receivable.php
application/hub/interfaces/pool/class_Poolable.php
application/hub/interfaces/pool/listener/.htaccess [new file with mode: 0644]
application/hub/interfaces/pool/listener/class_PoolableListener.php [new file with mode: 0644]
application/hub/interfaces/pool/peer/.htaccess [new file with mode: 0644]
application/hub/interfaces/pool/peer/class_PoolablePeer.php [new file with mode: 0644]
application/hub/interfaces/resolver/state/class_StateResolver.php
application/hub/interfaces/shareable/info/class_ShareableInfo.php
application/hub/interfaces/socket/class_SocketTag.php

index a84e33833f2e3f837504c7de24c87b41b8d7e83c..b00acce393fad61480b522041e470eb481cafcdd 100644 (file)
@@ -4,6 +4,7 @@ namespace Hub\Generic;
 
 // Import application-specific stuff
 use Hub\Information\ShareableInfo;
+use Hub\Network\Deliver\Deliverable;
 use Hub\Network\Receive\Receivable;
 use Hub\Pool\Poolable;
 
index f59d6fa8eb1ccf119477baa26c9160baf069cf2a..f304700c6d4455d9f39da9bc57c573a6bb6e72d0 100644 (file)
@@ -4,8 +4,10 @@ namespace Hub\Container\Socket;
 
 // Import application-specific stuff
 use Hub\Information\ShareableInfo;
+use Hub\Network\Package\NetworkPackage;
 
 // Import framework stuff
+use CoreFramework\Container\BaseContainer;
 use CoreFramework\Listener\Listenable;
 use CoreFramework\Registry\Registerable;
 
index 5815b6525eacd6afccec173e5439b6c0da39f9ad..ca13acd879d80e58a01d0271f3625e551047a804 100644 (file)
@@ -5,6 +5,7 @@ namespace Hub\Database\Frontend\Node\Dht;
 // Import application-specific stuff
 use Hub\Database\Frontend\Node\Information\NodeInformationDatabaseWrapper;
 use Hub\Factory\Node\NodeObjectFactory;
+use Hub\Network\Package\NetworkPackage;
 use Hub\Node\BaseHubNode;
 
 // Import framework stuff
index 929d02cb6f1b23d19fbc418f06f2302251ba0c5d..c2cadb773d6b4104174e6304b91350f32eda94d2 100644 (file)
@@ -4,6 +4,7 @@ namespace Hub\Database\Frontend\Node\PeerState;
 
 // Import application-specific sutff
 use Hub\Helper\Connection\ConnectionHelper;
+use Hub\Network\Package\NetworkPackage;
 use Hub\Tools\HubTools;
 
 // Import framework stuff
index 13e6396f327f47e4c9b20c237279a54a69e75cb9..7cf35191d28dbb8be13b8d381a149a8ed28be9ba 100644 (file)
@@ -2,6 +2,9 @@
 // Own namespace
 namespace Hub\Decoder;
 
+// Import application-specific stuff
+use Hub\Network\Package\NetworkPackage;
+
 // Import framework stuff
 use CoreFramework\Registry\Registerable;
 
index ca5a6485247dced794d81ad0a57dc959aa9504a1..acae4da49ef19f1fd2a9bd267cfc07dd4d21de5b 100644 (file)
@@ -4,6 +4,7 @@ namespace Hub\Discovery\Protocol;
 
 // Import application-specific stuff
 use Hub\Discovery\Node\BaseNodeDiscovery;
+use Hub\Network\Package\NetworkPackage;
 
 // Import framework stuff
 use CoreFramework\Registry\Registerable;
index c500bf673ae9edb88c43c745c49c8915213a8ae7..9c71434700e42040cbd41ddcbbb02dc0a40ae482 100644 (file)
@@ -3,6 +3,7 @@
 namespace Hub\Discovery\Network\Recipient;
 
 // Import hub-specific sutff
+use Hub\Network\Package\NetworkPackage;
 use Hub\Tools\HubTools;
 
 // Import framework stuff
index 2701189d0214768ba8c19dceb22857657dfbde85..9dedb5c7de01831fb26333b3c7ed2c338935914e 100644 (file)
@@ -6,6 +6,7 @@ namespace Hub\Network\Discovery\Socket;
 use Hub\Factory\Node\NodeObjectFactory;
 use Hub\Generic\BaseHubSystem;
 use Hub\Helper\Connection\BaseConnectionHelper;
+use Hub\Network\Package\NetworkPackage;
 
 // Import framework stuff
 use CoreFramework\Listener\Listenable;
index e070f0ef3f2f35b8b08631806f509c4b661a1cf2..2a8510f13d90ead4d4aef8672fd1b4afedabd6fc 100644 (file)
@@ -2,6 +2,9 @@
 // Own namespace
 namespace Hub\Factory\Socket;
 
+// Import application-specific stuff
+use Hub\Network\Package\NetworkPackage;
+
 // Import framework stuff
 use CoreFramework\Configuration\FrameworkConfiguration;
 use CoreFramework\Factory\ObjectFactory;
index c6a11ffd45a81893f4995584964ad965c632a2b0..0ce246bacf04d2692d3e8dd86778eba74c38b771 100644 (file)
@@ -3,6 +3,7 @@
 namespace Hub\Filter;
 
 // Import application-specific stuff
+use Hub\Network\Package\NetworkPackage;
 use Hub\Network\Receive\Receivable;
 
 // Import framework stuff
index 79abf439049509f8064c86a7b3fb6e310c903bea..6da72152b20cb8c6012a071dd964800682278fa7 100644 (file)
@@ -1,4 +1,10 @@
 <?php
+// Own namespace
+namespace Hub\Handler\Network\Socket\RawData;
+
+// Import application-specific stuff
+use Hub\Network\Networkable;
+
 /**
  * A file-based socket raw data handler
  *
index b499f0bb33573d775383df7ef4eb452ae76c907c..453123d717a9c000de45f8964e7bb24bb4f3ca16 100644 (file)
@@ -1,8 +1,9 @@
 <?php
 // Own namespace
-namespace Hub\Handler\RawData\Tcp;
+namespace Hub\Handler\Network\RawData\Tcp;
 
 // Import application-specific stuff
+use Hub\Network\Networkable;
 use Hub\Pool\BasePool;
 
 /**
index 8869f95d09f9a22754308fa140764784140d1f6e..42895f1df4d6eaeb4f33d495f641e70ae1ab42ea 100644 (file)
@@ -3,6 +3,7 @@
 namespace Hub\Handler\RawData\Udp;
 
 // Import application-specific stuff
+use Hub\Network\Networkable;
 use Hub\Pool\BasePool;
 
 /**
index 27bc54ff61fd4b7e934461435b89c97a7bead207..cbdc7f3c19d2f14eb7ea3ed42aa2e5527148723e 100644 (file)
@@ -2,7 +2,8 @@
 // Own namespace
 namespace Hub\Handler\Protocol;
 
-// Import hub-specific sutff
+// Import application-specific sutff
+use Hub\Locator\Node\UniversalNodeLocator;
 use Hub\Tools\HubTools;
 
 /**
index 5702c12f314828125672ea257af0fc751035ade3..8e0376aac11619c90a7300377ed2963aff996694 100644 (file)
@@ -1,4 +1,11 @@
 <?php
+// Own namespace
+namespace Hub\Handler\Protocol\Network\IpV4;
+
+// Import application-specific stuff
+use Hub\Locator\Node\UniversalNodeLocator;
+use Hub\Network\Package\NetworkPackage;
+
 /**
  * A general handler for IPv4 protocols such as TCP, UDP and others.
  *
index 804c8e3c5e93c1d4e62d66419dc7dfd1f7a8e870..9a2846c670e453048282dcf50acdae2648827497 100644 (file)
@@ -1,4 +1,10 @@
 <?php
+// Own namespace
+namespace Hub\Handler\Network\;
+
+// Import application-specific stuff
+use Hub\Network\Networkable;
+
 /**
  * A ??? network package handler
  *
index 275e7ec80d40f644ea5aca335a8f8aa2dbf6e3aa..37f427aec4aeda9e4ee676cb816acba7ae7601ab 100644 (file)
@@ -2,6 +2,9 @@
 // Own namespace
 namespace Hub\Handler\Data;
 
+// Import application-specific stuff
+use Hub\Network\Deliver\Deliverable;
+
 // Import framework stuff
 use CoreFramework\Factory\ObjectFactory;
 use CoreFramework\Generic\FrameworkException;
index 011cd0b2d122e28fc74dd8f3b05db7f2e29ebae9..ca0fa5a2d3cf7ad5b9f599980798be26bb65a413 100644 (file)
@@ -2,6 +2,9 @@
 // Own namespace
 namespace Hub\Handler\RawData;
 
+// Import application-specific stuff
+use Hub\Network\Networkable;
+
 /**
  * A !!! raw data handler
  *
index f06ab836799f5eb57ead6bbb4e7c23b294ec4f8b..8c4ce84922bfc4ee21723f927c09edd555152fed 100644 (file)
@@ -2,6 +2,9 @@
 // Own namespace
 namespace Hub\Handler\Raw;
 
+// Import application-specific stuff
+use Hub\Network\Package\NetworkPackage;
+
 // Import framework stuff
 use CoreFramework\Factory\ObjectFactory;
 use CoreFramework\Handler\BaseHandler;
index c1c0ef4a10963d7e4ed474b455b8ce4b9ff0ce9f..907ff5392d73d2a3e9a431297720d7f0a778cc6b 100644 (file)
@@ -4,6 +4,7 @@ namespace Hub\Helper\;
 
 // Import application-specific stuff
 use Hub\Helper\BaseHubSystemHelper;
+use Hub\Network\Package\NetworkPackage;
 
 /**
  * A ??? !!! helper class
index 60ec9e57f6a3e5b2bf30431e87074910064e5a8d..8b3796f7fdb64220f0a1576efcc48ca2ea27d4d8 100644 (file)
@@ -5,6 +5,7 @@ namespace Hub\Helper\Connection;
 // Import application-specific stuff
 use Hub\Factory\Fragmenter\FragmenterFactory;
 use Hub\Helper\BaseHubSystemHelper;
+use Hub\Network\Package\NetworkPackage;
 
 // Import framework stuff
 use CoreFramework\Factory\ObjectFactory;
index db6e4bd47c5f6c23a890874520cc0958d4b49f1f..a0947c038d02fdd627ba3c4b6782e31358a16278 100644 (file)
@@ -4,6 +4,7 @@ namespace Hub\Helper\Connection\IpV4;
 
 // Import application-specific stuff
 use Hub\Helper\Connection\BaseConnectionHelper;
+use Hub\Locator\Node\UniversalNodeLocator;
 
 /**
  * A ??? connection helper class
index acccfcfb82167c27e3f1e2393f6ff1dda248028f..c446e08ad7cc6b91ba404b21e188383dde0406cb 100644 (file)
@@ -4,6 +4,8 @@ namespace Hub\Helper\Connection\Tcp;
 
 // Import application-specific stuff
 use Hub\Helper\Connection\ConnectionHelper;
+use Hub\Locator\Node\UniversalNodeLocator;
+use Hub\Network\Package\NetworkPackage;
 use Hub\Tools\HubTools;
 
 /**
index a292b0cc4d6c237d226b6245149d0debab647208..725726a9f3b6b89a7cca281ffe0e7014535754b7 100644 (file)
@@ -5,6 +5,7 @@ namespace Hub\Helper\Dht\Bootstrap;
 // Import hub-specific stuff
 use Hub\Generic\BaseHubSystem;
 use Hub\Helper\BaseHubSystemHelper;
+use Hub\Network\Package\NetworkPackage;
 
 /**
  * A Bootstrap Dht helper class
index 7af9f63ea6324f0c0e914989221e642b518c7692..5e26a71ffb88ca0fb21f0893ca3f9ffa5653d60e 100644 (file)
@@ -5,6 +5,7 @@ namespace Hub\Helper\Dht\Publish;
 // Import hub-specific stuff
 use Hub\Generic\BaseHubSystem;
 use Hub\Helper\BaseHubSystemHelper;
+use Hub\Network\Package\NetworkPackage;
 
 /**
  * A PublishingEntry Dht helper class
index cc5519d6d12eb4ce0409691e9e25d597bdfa4c6f..4b86a02a8be26ef602d1b20bd067c84c7ba3cdd6 100644 (file)
@@ -4,6 +4,7 @@ namespace Hub\Node\Helper\Announcement;
 
 // Import application-specific stuff
 use Hub\Helper\Node\NodeHelper;
+use Hub\Network\Package\NetworkPackage;
 
 /**
  * A helper class for announcing this node to other nodes
index 780a6a18a409254c2f2f83c82e2b9c9a73bb53a8..60602db13ed86c82389ec48324f5ba0f0f83928c 100644 (file)
@@ -4,6 +4,7 @@ namespace Hub\Node\Helper\;
 
 // Import application-specific stuff
 use Hub\Helper\Node\NodeHelper;
+use Hub\Network\Package\NetworkPackage;
 
 /**
  * A ??? hub helper class
index 9d45f3cc872458cdd5cde2018d6945cd13b21688..4c812a8abf8584ada2a1016da09ca3b5e331bf4c 100644 (file)
@@ -4,6 +4,7 @@ namespace Hub\Node\Helper\SelfConnect;
 
 // Import application-specific stuff
 use Hub\Helper\Node\NodeHelper;
+use Hub\Network\Package\NetworkPackage;
 
 /**
  * A SelfConnect hub helper class
index bafaf60dbfa204ac93ec80cb84ab162ba61cd2dd..97c54d7467f7c275e9d4151f6563399dc0da98b5 100644 (file)
@@ -4,6 +4,7 @@ namespace Hub\Node\Helper\Request\NodeList;
 
 // Import application-specific stuff
 use Hub\Helper\Node\NodeHelper;
+use Hub\Network\Package\NetworkPackage;
 
 /**
  * A ??? hub helper class
index 49473c824888ed8bfe1652ed835b7e2c33d3e1c4..308d219e438db7e74961ef4a54d8dec3cbe62b59 100644 (file)
@@ -3,8 +3,10 @@
 namespace Hub\Information\Connection;
 
 // Import application-specific stuff
+use Hub\Helper\Connection\ConnectionHelper;
 use Hub\Information\BaseInfo;
 use Hub\Information\ShareableInfo;
+use Hub\Locator\Node\UniversalNodeLocator;
 
 // Import framework stuff
 use CoreFramework\Listener\Listenable;
index 938e07c82304d4ca786640950520f2c1996bfe91..79aa06f973a072682bccd073ad43b1ea37935b96 100644 (file)
@@ -3,7 +3,8 @@
 namespace Hub\Listener;
 
 // Import application-specific stuff
-use Hub\Pool\Poolable;
+use Hub\Network\Package\NetworkPackage;
+use Hub\Pool\Peer\PoolablePeer;
 
 // Import framework stuff
 use CoreFramework\Factory\Connection\ConnectionInfoFactory;
@@ -182,7 +183,7 @@ class BaseListener extends BaseFrameworkSystem implements Visitable {
        /**
         * Setter for peer pool instance
         *
-        * @param       $poolInstance   The peer pool instance we shall set
+        * @param       $poolInstance   An instance of a PoolablePeer class
         * @return      void
         */
        protected final function setPoolInstance (PoolablePeer $poolInstance) {
@@ -192,7 +193,7 @@ class BaseListener extends BaseFrameworkSystem implements Visitable {
        /**
         * Getter for peer pool instance
         *
-        * @return      $poolInstance   The peer pool instance we shall set
+        * @return      $poolInstance   An instance of a PoolablePeer class
         */
        public final function getPoolInstance () {
                return $this->poolInstance;
index 1cb1d15da8808f15678f76bfa72559380b9c5e48..1a31e49cba662fde02f58b298472277e42cadb3a 100644 (file)
@@ -2,6 +2,9 @@
 // Own namespace
 namespace Hub\Listener;
 
+// Import application-specific stuff
+use Hub\Network\Networkable;
+
 // Import framework stuff
 use CoreFramework\Generic\BaseDecorator;
 use CoreFramework\Visitor\Visitable;
index 678d493de144a66bfb70f253f804c71f835893c7..dd19fc13b29129dbc044c9faf40c1045a8de98d2 100644 (file)
@@ -7,6 +7,7 @@ use Hub\Database\Frontend\Node\Information\NodeInformationDatabaseWrapper;
 use Hub\Factory\State\Node\NodeStateFactory;
 use Hub\Locator\Node\LocateableNode;
 use Hub\Generic\BaseHubSystem;
+use Hub\Network\Package\NetworkPackage;
 use Hub\Network\Receive\Receivable;
 use Hub\Tools\HubTools;
 
index 15c2028caade73b2f6413dcd71a534d99e9aae4d..f82e66d362a18c382aff83085ebb6f5e9379f876 100644 (file)
@@ -4,6 +4,7 @@ namespace Hub\Network\Package\Assembler;
 
 // Import hub-specific stuff
 use Hub\Generic\BaseHubSystem;
+use Hub\Network\Package\NetworkPackage;
 use Hub\Network\Receive\Receivable;
 
 // Import framework stuff
index 4437bf296fb61eb4389ef5df84862f88580c3dcb..84986274502a66a26a0de0f8f0ae367b6bc63ea6 100644 (file)
@@ -11,6 +11,8 @@ use Hub\Helper\Connection\BaseConnectionHelper;
 use Hub\Helper\Connection\ConnectionHelper;
 use Hub\Helper\HubHelper;
 use Hub\Information\ShareableInfo;
+use Hub\Network\Deliver\Deliverable;
+use Hub\Network\Networkable;
 use Hub\Network\Receive\Receivable;
 use Hub\Tools\HubTools;
 
index e48e923744ed535c7837d688b6968ce40e12205a..37d0018e1de85b05c267fbc16c12db5ae19af8bf 100644 (file)
@@ -5,6 +5,7 @@ namespace Hub\Network\Package\Fragment;
 // Import application-specific stuff
 use Hub\Generic\BaseHubSystem;
 use Hub\Helper\Connection\ConnectionHelper;
+use Hub\Network\Package\NetworkPackage;
 
 // Import framework stuff
 use CoreFramework\Factory\ObjectFactory;
index 5772d3983e35e346ef6e01fa9f213370663abb1b..d7e2c56ed5735c75b2ea7b153f52c73619ef202d 100644 (file)
@@ -5,7 +5,7 @@ namespace Hub\Pool\Listener;
 // Import application-specific stuff
 use Hub\Helper\Node\NodeHelper;
 use Hub\Pool\BasePool;
-use Hub\Pool\Poolable;
+use Hub\Pool\Listener\PoolableListener;
 
 // Import framework stuff
 use CoreFramework\Factory\ObjectFactory;
@@ -33,7 +33,7 @@ use CoreFramework\Listener\Listenable;
  * 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 DefaultListenerPool extends BasePool implements Poolable {
+class DefaultListenerPool extends BasePool implements PoolableListener {
        /**
         * Protected constructor
         *
index 2239f6aefe64626d0ec171d3fb7a6af473fff5aa..27a95a48a67ee5dcc9e4cc899d5ff2597c599840 100644 (file)
@@ -3,8 +3,10 @@
 namespace Hub\Pool\Peer;
 
 // Import application-specific stuff
+use Hub\Locator\Node\UniversalNodeLocator;
+use Hub\Network\Package\NetworkPackage;
 use Hub\Pool\BasePool;
-use Hub\Pool\Poolable;
+use Hub\Pool\Peer\PoolablePeer;
 
 // Import framework stuff
 use CoreFramework\Listener\Listenable;
@@ -46,7 +48,7 @@ class DefaultPeerPool extends BasePool implements PoolablePeer {
         * Creates an instance of this class
         *
         * @param       $listenerInstance       A Listenable instance
-        * @return      $poolInstance           An instance a Poolable class
+        * @return      $poolInstance           An instance a PoolablePeer class
         */
        public static final function createDefaultPeerPool (Listenable $listenerInstance) {
                // Get new instance
index 8fe4535e55ee9b7d4f3753981300b52ddafda596..09b161c35baa843a5a45e39f46acaa56f0fbeeb7 100644 (file)
@@ -2,6 +2,9 @@
 // Own namespace
 namespace Hub\Recipient\Dht;
 
+// Import application-specific stuff
+use Hub\Network\Package\NetworkPackage;
+
 // Import framework stuff
 use CoreFramework\Factory\ObjectFactory;
 use CoreFramework\Lists\Listable;
index c60311554e4bdf685b74bbae8b48b3c13f56cd7e..754742f1a6e852b1c3f86e41e83b7845a4c89b61 100644 (file)
@@ -3,6 +3,7 @@
 namespace Hub\Network\Recipient\Direct;
 
 // Import hub-specific sutff
+use Hub\Network\Package\NetworkPackage;
 use Hub\Tools\HubTools;
 
 // Import framework stuff
index 838c9fd882c9d01d831f2a73ffe1e9b0a61034af..ea924a1d587ab9dfaa4a6335632e5038923fd8b1 100644 (file)
@@ -3,6 +3,7 @@
 namespace Hub\Network\Recipient\Self;
 
 // Import hub-specific sutff
+use Hub\Network\Package\NetworkPackage;
 use Hub\Tools\HubTools;
 
 // Import framework stuff
index 1b24135f43ed79d26c89febe7ec1741d40ced042..5fd5db3d9c718080629fb44d6af41723b68098eb 100644 (file)
@@ -4,6 +4,7 @@ namespace Hub\Network\Receipt\Upper;
 
 // Import hub-specific stuff
 use Hub\Generic\BaseHubSystem;
+use Hub\Network\Package\NetworkPackage;
 
 // Import framework stuff
 use CoreFramework\Lists\Listable;
index b60fb2d9e3d7edae19114a04a653dba2a55968cf..d6e03a6aa3088657a51f4504a08ad4d6f03ba062 100644 (file)
@@ -4,13 +4,15 @@ namespace Hub\Registry\Socket;
 
 // Import application-specific stuff
 use Hub\Information\ShareableInfo;
+use Hub\Network\Package\NetworkPackage;
+use Hub\Registry\Socket\RegisterableSocket;
 
 // Import framework stuff
 use CoreFramework\Factory\ObjectFactory;
 use CoreFramework\Listener\Listenable;
 use CoreFramework\Registry\BaseRegistry;
 use CoreFramework\Registry\Register;
-use Hub\Registry\Socket\RegisterableSocket;
+use CoreFramework\Registry\Sub\SubRegistry;
 
 /**
  * A Socket registry
index 0fe8ad47bae8030d7fc0149390d5c79434ef1cd5..9cb6e22d6c66fab71c4808c34c8be30c69437e74 100644 (file)
@@ -3,6 +3,7 @@
 namespace Hub\Tag\Network;
 
 // Import application-specific stuff
+use Hub\Network\Package\NetworkPackage;
 
 // Import framework stuff
 use CoreFramework\Listener\Listenable;
index a3db3b3b9635c353b8f12284a41f2972352f8484..d044ae8ac4d1a41a377c7077bc2c6e03ae6c3b58 100644 (file)
@@ -65,6 +65,7 @@ class RawDataPoolMonitorVisitor extends BaseVisitor implements PoolVisitor, List
         *
         * @param       $poolInstance   A Poolable instance
         * @return      void
+        * @todo        Maybe throw UnsupportedOperationException?
         */
        public function visitPool (Poolable $poolInstance) {
                // A pool doesn't normally have any raw data waiting
index 1bd535e5eea530a91ee299a297636e7dbede592d..a26d5ac8ee5bb555a72858474fd03a608553baa9 100644 (file)
@@ -4,6 +4,7 @@ namespace Hub\Visitor\Shutdown\Socket;
 
 // Import application-specific stuff
 use Hub\Helper\Connection\ConnectionHelper;
+use Hub\Network\Deliver\Deliverable;
 
 // Import framework stuff
 use CoreFramework\Visitor\BaseVisitor;
index 103cb9d184cb08d74134ee4023b5237bf2fd13d7..873460e171e2620239e71cf43a59f1bd2432db69 100644 (file)
@@ -4,6 +4,7 @@ namespace Hub\Visitor\Shutdown\Socket;
 
 // Import application-specific stuff
 use Hub\Helper\Connection\ConnectionHelper;
+use Hub\Network\Deliver\Deliverable;
 
 // Import framework stuff
 use CoreFramework\Visitor\BaseVisitor;
index 9879192065db2b0a2b8030927968b66d3cf6425d..cdee06da2539f9e6b3d1adc4b054d39ba4d2be93 100644 (file)
@@ -94,10 +94,10 @@ $cfg->setConfigEntry('client_tcp_listener_class', 'ClientTcpListenerDecorator');
 $cfg->setConfigEntry('client_udp_listener_class', 'ClientUdpListenerDecorator');
 
 // CFG: NODE-POOL-CLASS
-$cfg->setConfigEntry('node_pool_class', 'DefaultPeerPool');
+$cfg->setConfigEntry('node_pool_class', 'Hub\Pool\Peer\DefaultPeerPool');
 
 // CFG: APPLICATION-POOL-CLASS
-$cfg->setConfigEntry('application_pool_class', 'DefaultPeerPool');
+$cfg->setConfigEntry('application_pool_class', 'Hub\Pool\Peer\DefaultPeerPool');
 
 // CFG: POOL-ENTRIES-LIST-CLASS
 $cfg->setConfigEntry('pool_entries_list_class', 'Hub\Lists\Pool\PoolEntriesList');
@@ -709,7 +709,7 @@ $cfg->setConfigEntry('raw_package_compressor_class', 'ZlibCompressor');
 $cfg->setConfigEntry('socket_registry_class', 'Hub\Registry\Socket\SocketRegistry');
 
 // CFG: SOCKET-CONTAINER-CLASS
-$cfg->setConfigEntry('socket_container_class', 'SocketContainer');
+$cfg->setConfigEntry('socket_container_class', 'Hub\Container\Socket\SocketContainer');
 
 // CFG: IPC-SOCKET-FILE-NAME
 $cfg->setConfigEntry('ipc_socket_file_name', 'php_hub_ipc_socket');
index 3730d93175edd045e96249ebfe50a6d65e87b17c..b0b691b63dde0f779777197f54a591d95a76122c 100644 (file)
@@ -1,4 +1,10 @@
 <?php
+// Own namespace
+namespace Hub\RawData;
+
+// Import application-specific stuff
+use Hub\Network\Package\NetworkPackage;
+
 /**
  * This exception is thrown when the checksum (sometimes called "hash") of the
  * package data (aka "message" emcoded with BASE64) is not valid.
index 3cb87887b64b861de2ad6c3e04e31c4b82dbd6f8..d63d92e8f69372c8a641b59a3234077b4ab8dca9 100644 (file)
@@ -1,4 +1,10 @@
 <?php
+// Own namespace
+namespace Hub\Status\Package;
+
+// Import application-specific stuff
+use Hub\Network\Package\NetworkPackage;
+
 /**
  * This exception is thrown when an unexpected package status was detected.
  *
index 38db37111b7ca40122a5e9e08c53a15d539cc578..61c5c62e0996113f1469f12ec97e8b93dbb2e9d4 100644 (file)
@@ -1,4 +1,10 @@
 <?php
+// Own namespace
+namespace Hub\Peer;
+
+// Import application-specific stuff
+use Hub\Network\Package\NetworkPackage;
+
 /**
  * This exception is thrown when a peer is already registered
  *
index 33d7ecae25751958382d4b6870d41762c69bda8c..172b2dd93a382a7f773ee18b760ced1bf089d0b8 100644 (file)
@@ -2,6 +2,9 @@
 // Own namespace
 namespace Hub\Socket;
 
+// Import application-specific stuff
+use Hub\Helper\Connection\ConnectionHelper;
+
 /**
  * This exception is thrown if the socket cannot be shut down is not error 107
  * which is "Transport endpoint not connected".
index 14a7f4726420289c77967380df074d98721675e5..fa43107c90f8a9e475fad25b22a6fcdac007739a 100644 (file)
@@ -1,4 +1,10 @@
 <?php
+// Own namespace
+namespace Hub\Unl;
+
+// Import application-specific stuff
+use Hub\Network\Package\NetworkPackage;
+
 /**
  * This exception is thrown when a protocol handler cannot validate given package data's recipient (UNL).
  *
index 140de37d40bec109427122b3b233d4c84bade335..651bfef0f6c390fd6441a9db26aeeb09427a2f08 100644 (file)
@@ -1,4 +1,7 @@
 <?php
+// Own namespace
+namespace Hub\Network;
+
 /**
  * A Networkable interface
  *
index 7155664b77b16f8c704ab5bc4643102e7b0b73a3..c36e9eb46717cb1ef9337db0f5ec88eb9a671df8 100644 (file)
@@ -2,6 +2,9 @@
 // Own namespace
 namespace Hub\Network\Receive;
 
+// Import application-specific stuff
+use Hub\Network\Networkable;
+
 // Import framework stuff
 use CoreFramework\Generic\FrameworkInterface;
 
index e78a4abac5581ee5d58702c5e0704651ef6d605d..af0242eaa49baca2bdfdb65237a62bd0f35db145 100644 (file)
@@ -4,7 +4,6 @@ namespace Hub\Pool;
 
 // Import framework stuff
 use CoreFramework\Generic\FrameworkInterface;
-use CoreFramework\Listener\Listenable;
 
 /**
  * A Poolable interface
@@ -37,12 +36,4 @@ interface Poolable extends FrameworkInterface {
         */
        function preShutdown ();
 
-       /**
-        * Adds a listener instance to this pool
-        *
-        * @param       $poolInstance   An instance of a Listenable class
-        * @return      void
-        */
-       function addListener (Listenable $poolInstance);
-
 }
diff --git a/application/hub/interfaces/pool/listener/.htaccess b/application/hub/interfaces/pool/listener/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/application/hub/interfaces/pool/listener/class_PoolableListener.php b/application/hub/interfaces/pool/listener/class_PoolableListener.php
new file mode 100644 (file)
index 0000000..114a276
--- /dev/null
@@ -0,0 +1,43 @@
+<?php
+// Own namespace
+namespace Hub\Pool\Listener;
+
+// Import application-specific stuff
+use Hub\Pool\Poolable;
+
+// Import framework stuff
+use CoreFramework\Listener\Listenable;
+
+/**
+ * A Poolable interface for listener
+ *
+ * @author             Roland Haeder <webmaster@ship-simu.org>
+ * @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 <http://www.gnu.org/licenses/>.
+ */
+interface PoolableListener extends Poolable {
+
+       /**
+        * Adds a listener instance to this pool
+        *
+        * @param       $poolInstance   An instance of a Listenable class
+        * @return      void
+        */
+       function addListener (Listenable $poolInstance);
+
+}
diff --git a/application/hub/interfaces/pool/peer/.htaccess b/application/hub/interfaces/pool/peer/.htaccess
new file mode 100644 (file)
index 0000000..3a42882
--- /dev/null
@@ -0,0 +1 @@
+Deny from all
diff --git a/application/hub/interfaces/pool/peer/class_PoolablePeer.php b/application/hub/interfaces/pool/peer/class_PoolablePeer.php
new file mode 100644 (file)
index 0000000..737df9f
--- /dev/null
@@ -0,0 +1,66 @@
+<?php
+// Own namespace
+namespace Hub\Pool\Peer;
+
+// Import application-specific stuff
+use Hub\Pool\Poolable;
+use Hub\Tag\Socket\SocketTag;
+
+/**
+ * An interface for peer pools
+ *
+ * @author             Roland Haeder <webmaster@shipsimu.org>
+ * @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 <http://www.gnu.org/licenses/>.
+ */
+interface PoolablePeer extends Poolable, SocketTag {
+       /**
+        * Adds a socket resource to the peer pool
+        *
+        * @param       $socketResource         A valid (must be!) socket resource
+        * @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
+        */
+       function addPeer ($socketResource, $connectionType);
+
+       /**
+        * Getter for array of all socket resource arrays
+        *
+        * @return      $sockets        An array with all socket arrays
+        */
+       function getAllSockets ();
+
+       /**
+        * Getter for array of all socket resources
+        *
+        * @return      $sockets        An array with all sockets
+        */
+       function getAllSingleSockets ();
+
+       /**
+        * "Getter" for all sockets of specified type
+        *
+        * @param       $connectionType         Type of connection, can only be 'incoming', 'outgoing' or 'server'
+        * @return      $sockets                        An array with sockets of given type
+        * @throws      InvalidConnectionTypeException  If the provided connection type is not valid
+        */
+       function getSocketsByConnectionType ($connectionType);
+
+}
index ea4236d19ab1849106be52220b81f4bc74a79a3a..dabe7930d59a17f3db4c2f014327fcce0c15843b 100644 (file)
@@ -2,6 +2,9 @@
 // Own namespace
 namespace Hub\Resolver\State;
 
+// Import application-specific stuff
+use Hub\Helper\Connection\ConnectionHelper;
+
 // Import framework stuff
 use CoreFramework\Resolver\Resolver;
 
index 44121242ab6fe55ae8316ec1a1ef901d76df57a7..203bbda036a13ea8843652cb2b160d2b810e0fd5 100644 (file)
@@ -2,6 +2,9 @@
 // Own namespace
 namespace Hub\Information;
 
+// Import application-specific stuff
+use Hub\Helper\Connection\ConnectionHelper;
+
 // Import framework stuff
 use CoreFramework\Generic\FrameworkInterface;
 use CoreFramework\Listener\Listenable;
index a31d7eadbd7d57737afd6050fca5286a00d393e4..b488b6444d11846e16a050887ba01a132388eeb6 100644 (file)
@@ -37,7 +37,5 @@ interface SocketTag extends FrameworkInterface {
         * @throws      InvalidConnectionTypeException  If the provided connection type is not valid
         */
        function getSocketFromPackageData (array $packageData, $connectionType = NULL);
-}
 
-// [EOF]
-?>
+}