]> git.mxchange.org Git - hub.git/commitdiff
Continued with rewrite:
authorRoland Haeder <roland@mxchange.org>
Thu, 21 Jan 2016 18:22:20 +0000 (19:22 +0100)
committerRoland Häder <roland@mxchange.org>
Fri, 21 Aug 2020 16:49:55 +0000 (18:49 +0200)
- moved 'pool' interfaces to 'core' as they are generic enough.
- more rewrites (broken stuff)

Signed-off-by: Roland Häder <roland@mxchange.org>
16 files changed:
application/hub/classes/database/frontend/states/class_PeerStateLookupDatabaseWrapper.php
application/hub/classes/handler/chunks/class_ChunkHandler.php
application/hub/classes/helper/connection/ipv4/class_BaseIpV4ConnectionHelper.php
application/hub/classes/helper/connection/ipv4/tcp/class_TcpConnectionHelper.php
application/hub/classes/listener/tcp/class_TcpListener.php
application/hub/classes/listener/udp/class_UdpListener.php
application/hub/classes/package/assembler/class_PackageAssembler.php
application/hub/classes/package/class_NetworkPackage.php
application/hub/classes/pools/peer/class_DefaultPeerPool.php
application/hub/classes/resolver/state/peer/class_PeerStateResolver.php
application/hub/interfaces/pool/.htaccess [deleted file]
application/hub/interfaces/pool/class_Poolable.php [deleted file]
application/hub/interfaces/pool/listener/.htaccess [deleted file]
application/hub/interfaces/pool/listener/class_PoolableListener.php [deleted file]
application/hub/interfaces/pool/peer/.htaccess [deleted file]
application/hub/interfaces/pool/peer/class_PoolablePeer.php [deleted file]

index 64d9f9df8f281e2f56629006977b70b439928a00..e147e1618f959f17b4150c36dd0d78687e3522fe 100644 (file)
@@ -222,7 +222,7 @@ class PeerStateLookupDatabaseWrapper extends BaseDatabaseWrapper implements Look
                        $lastError = socket_last_error($socketResource);
 
                        // Doesn't work!
-                       throw new InvalidSocketException(array($this, $socketResource, $lastError, socket_strerror($lastError)), BaseListener::EXCEPTION_INVALID_SOCKET);
+                       throw new InvalidSocketException(array($this, $socketResource, $lastError, socket_strerror($lastError)), SocketHandler::EXCEPTION_INVALID_SOCKET);
                } // END - if
 
                // Debug message
index 180805cdd1739465ad02f1925fe38fa6e951d785..6054bde60eddd1192e13229f9eb90a57f2f56765 100644 (file)
@@ -39,6 +39,9 @@ class ChunkHandler extends BaseHandler implements HandleableChunks, Registerable
        const CHUNK_SPLITS_INDEX_SERIAL   = 1;
        const CHUNK_SPLITS_INDEX_RAW_DATA = 2;
 
+       // Exception codes
+       const EXCEPTION_FINAL_CHUNK_VERIFICATION = 0xf3300;
+
        /**
         * The final array for assembling the original package back together
         */
@@ -444,7 +447,7 @@ class ChunkHandler extends BaseHandler implements HandleableChunks, Registerable
                        $this->isValidFinalChunk($chunks);
                } catch (AssertionException $e) {
                        // Last chunk is not valid
-                       throw new FinalChunkVerificationException(array($this, $chunks, $e), BaseListener::EXCEPTION_FINAL_CHUNK_VERIFICATION);
+                       throw new FinalChunkVerificationException(array($this, $chunks, $e), self::EXCEPTION_FINAL_CHUNK_VERIFICATION);
                }
 
                // Do we have some pending chunks (no final)?
index 895acb9ac9037bf6840ae002a5224f1565d5e203..07f94a6e1aa52e87d1169efe6f40db657868c301 100644 (file)
@@ -75,7 +75,7 @@ class BaseIpV4ConnectionHelper extends BaseConnectionHelper {
 
                        // And throw again
                        // @TODO Move this to the socket error handler
-                       throw new SocketOptionException(array($this, $socketResource, $socketError, $errorMessage), BaseListener::EXCEPTION_INVALID_SOCKET);
+                       throw new SocketOptionException(array($this, $socketResource, $socketError, $errorMessage), SocketHandler::EXCEPTION_INVALID_SOCKET);
                } // END - if
 
                /*
@@ -88,7 +88,7 @@ class BaseIpV4ConnectionHelper extends BaseConnectionHelper {
                        $helperInstance->handleSocketError(__METHOD__, __LINE__, $socketResource, array('0.0.0.0', '0'));
 
                        // And throw again
-                       throw new SocketOptionException(array($helperInstance, $socketResource, $socketError, $errorMessage), BaseListener::EXCEPTION_INVALID_SOCKET);
+                       throw new SocketOptionException(array($helperInstance, $socketResource, $socketError, $errorMessage), SocketHandler::EXCEPTION_INVALID_SOCKET);
                } // END - if
 
                // Last step: mark connection as initialized
@@ -230,7 +230,7 @@ class BaseIpV4ConnectionHelper extends BaseConnectionHelper {
                $this->shutdownSocket($socketResource);
 
                // Throw it again
-               throw new SocketConnectionException(array($this, $socketResource, $socketError, $errorMessage), BaseListener::EXCEPTION_INVALID_SOCKET);
+               throw new SocketConnectionException(array($this, $socketResource, $socketError, $errorMessage), SocketHandler::EXCEPTION_INVALID_SOCKET);
        }
 
        /**
@@ -253,7 +253,7 @@ class BaseIpV4ConnectionHelper extends BaseConnectionHelper {
                $this->shutdownSocket($socketResource);
 
                // Throw it again
-               throw new SocketConnectionException(array($this, $socketResource, $socketError, $errorMessage), BaseListener::EXCEPTION_INVALID_SOCKET);
+               throw new SocketConnectionException(array($this, $socketResource, $socketError, $errorMessage), SocketHandler::EXCEPTION_INVALID_SOCKET);
        }
 
        /**
@@ -276,7 +276,7 @@ class BaseIpV4ConnectionHelper extends BaseConnectionHelper {
                $this->shutdownSocket($socketResource);
 
                // Throw it again
-               throw new SocketConnectionException(array($this, $socketResource, $socketError, $errorMessage), BaseListener::EXCEPTION_INVALID_SOCKET);
+               throw new SocketConnectionException(array($this, $socketResource, $socketError, $errorMessage), SocketHandler::EXCEPTION_INVALID_SOCKET);
        }
 
        /**
@@ -299,7 +299,7 @@ class BaseIpV4ConnectionHelper extends BaseConnectionHelper {
                $this->shutdownSocket($socketResource);
 
                // Throw it again
-               throw new SocketConnectionException(array($this, $socketResource, $socketError, $errorMessage), BaseListener::EXCEPTION_INVALID_SOCKET);
+               throw new SocketConnectionException(array($this, $socketResource, $socketError, $errorMessage), SocketHandler::EXCEPTION_INVALID_SOCKET);
        }
 
        /**
@@ -323,7 +323,7 @@ class BaseIpV4ConnectionHelper extends BaseConnectionHelper {
                $this->halfShutdownSocket($socketResource);
 
                // Throw it again
-               throw new SocketConnectionException(array($this, $socketResource, $socketError, $errorMessage), BaseListener::EXCEPTION_INVALID_SOCKET);
+               throw new SocketConnectionException(array($this, $socketResource, $socketError, $errorMessage), SocketHandler::EXCEPTION_INVALID_SOCKET);
        }
 
        /**
@@ -346,7 +346,7 @@ class BaseIpV4ConnectionHelper extends BaseConnectionHelper {
                $this->shutdownSocket($socketResource);
 
                // Throw it again
-               throw new SocketConnectionException(array($this, $socketResource, $socketError, $errorMessage), BaseListener::EXCEPTION_INVALID_SOCKET);
+               throw new SocketConnectionException(array($this, $socketResource, $socketError, $errorMessage), SocketHandler::EXCEPTION_INVALID_SOCKET);
        }
 
        /**
index 954c7f344609c00e13a53cbcca7c95513103fd31..7ef993c2593a3c7aaea062c3ceec50770ce49738 100644 (file)
@@ -62,7 +62,7 @@ class TcpConnectionHelper extends BaseIpV4ConnectionHelper implements Connection
                         * possible here because that method would throw an
                         * InvalidSocketException back.
                         */
-                       throw new SocketCreationException(array($helperInstance, gettype($socketResource)), BaseListener::EXCEPTION_SOCKET_CREATION_FAILED);
+                       throw new SocketCreationException(array($helperInstance, gettype($socketResource)), SocketHandler::EXCEPTION_SOCKET_CREATION_FAILED);
                } // END - if
 
                // Get socket error code for verification
@@ -74,7 +74,7 @@ class TcpConnectionHelper extends BaseIpV4ConnectionHelper implements Connection
                        $helperInstance->handleSocketError(__METHOD__, __LINE__, $socketResource, array('0.0.0.0', '0'));
 
                        // Then throw again
-                       throw new SocketCreationException(array($helperInstance, gettype($socketResource), $socketError, socket_strerror($socketError)), BaseListener::EXCEPTION_SOCKET_CREATION_FAILED);
+                       throw new SocketCreationException(array($helperInstance, gettype($socketResource), $socketError, socket_strerror($socketError)), SocketHandler::EXCEPTION_SOCKET_CREATION_FAILED);
                } // END - if
 
                // Debug message
@@ -169,7 +169,7 @@ class TcpConnectionHelper extends BaseIpV4ConnectionHelper implements Connection
                        // Could not shutdown socket, this is fine if e.g. the other side is not connected, so analyse it
                        if (socket_last_error($this->getSocketResource()) != 107) {
                                // Something bad happened while we shutdown a socket
-                               throw new SocketShutdownException($this, BaseListener::EXCEPTION_INVALID_SOCKET);
+                               throw new SocketShutdownException($this, SocketHandler::EXCEPTION_INVALID_SOCKET);
                        } // END - if
                } // END - if
 
index 92eb02e161b27c649bbb32ca0cb731548d1273a5..c0539b83a3f6d94820942d7303be071b5abbb19a 100644 (file)
@@ -61,7 +61,7 @@ class TcpListener extends BaseListener implements Listenable {
                // Is the socket resource valid?
                if (!is_resource($mainSocket)) {
                        // Something bad happened
-                       throw new InvalidSocketException(array($this, $mainSocket), BaseListener::EXCEPTION_INVALID_SOCKET);
+                       throw new InvalidSocketException(array($this, $mainSocket), SocketHandler::EXCEPTION_INVALID_SOCKET);
                } // END - if
 
                // Get socket error code for verification
@@ -73,7 +73,7 @@ class TcpListener extends BaseListener implements Listenable {
                        $this->handleSocketError(__METHOD__, __LINE__, $mainSocket, array('0.0.0.0', '0'));
                        /*
                        // Then throw again
-                       throw new InvalidSocketException(array($this, $mainSocket, $socketError, socket_strerror($socketError)), BaseListener::EXCEPTION_INVALID_SOCKET);
+                       throw new InvalidSocketException(array($this, $mainSocket, $socketError, socket_strerror($socketError)), SocketHandler::EXCEPTION_INVALID_SOCKET);
                        */
                } // END - if
 
@@ -92,7 +92,7 @@ class TcpListener extends BaseListener implements Listenable {
                        $this->shutdownSocket($mainSocket);
 
                        // And throw again
-                       throw new InvalidSocketException(array($this, $mainSocket, $socketError, $errorMessage), BaseListener::EXCEPTION_INVALID_SOCKET);
+                       throw new InvalidSocketException(array($this, $mainSocket, $socketError, $errorMessage), SocketHandler::EXCEPTION_INVALID_SOCKET);
                        */
                } // END - if
 
@@ -116,7 +116,7 @@ class TcpListener extends BaseListener implements Listenable {
                        $this->shutdownSocket($mainSocket);
 
                        // And throw again
-                       throw new InvalidSocketException(array($this, $mainSocket, $socketError, $errorMessage), BaseListener::EXCEPTION_INVALID_SOCKET);
+                       throw new InvalidSocketException(array($this, $mainSocket, $socketError, $errorMessage), SocketHandler::EXCEPTION_INVALID_SOCKET);
                        */
                } // END - if
 
@@ -136,7 +136,7 @@ class TcpListener extends BaseListener implements Listenable {
                        $this->shutdownSocket($mainSocket);
 
                        // And throw again
-                       throw new InvalidSocketException(array($this, $mainSocket, $socketError, $errorMessage), BaseListener::EXCEPTION_INVALID_SOCKET);
+                       throw new InvalidSocketException(array($this, $mainSocket, $socketError, $errorMessage), SocketHandler::EXCEPTION_INVALID_SOCKET);
                        */
                } // END - if
 
@@ -156,7 +156,7 @@ class TcpListener extends BaseListener implements Listenable {
                        $this->shutdownSocket($mainSocket);
 
                        // And throw again
-                       throw new InvalidSocketException(array($this, $mainSocket, $socketError, $errorMessage), BaseListener::EXCEPTION_INVALID_SOCKET);
+                       throw new InvalidSocketException(array($this, $mainSocket, $socketError, $errorMessage), SocketHandler::EXCEPTION_INVALID_SOCKET);
                        */
                } // END - if
 
index 63dbd2f93f2ed293610d3e1738ef6205e9abf9f4..a5aff183e94e1d6ddea6490061f5a3e7f882165b 100644 (file)
@@ -62,7 +62,7 @@ class UdpListener extends BaseListener implements Listenable {
                // Is the socket a valid resource or do we have any error?
                if (!is_resource($mainSocket)) {
                        // Then throw an InvalidSocketException
-                       throw new InvalidSocketException(array($this, $mainSocket), BaseListener::EXCEPTION_INVALID_SOCKET);
+                       throw new InvalidSocketException(array($this, $mainSocket), SocketHandler::EXCEPTION_INVALID_SOCKET);
                } // END - if
 
                /*
@@ -85,7 +85,7 @@ class UdpListener extends BaseListener implements Listenable {
                        $this->shutdownSocket($mainSocket);
 
                        // And throw again
-                       throw new InvalidSocketException(array($this, $mainSocket, $socketError, $errorMessage), BaseListener::EXCEPTION_INVALID_SOCKET);
+                       throw new InvalidSocketException(array($this, $mainSocket, $socketError, $errorMessage), SocketHandler::EXCEPTION_INVALID_SOCKET);
                        */
                } // END - if
 
@@ -105,7 +105,7 @@ class UdpListener extends BaseListener implements Listenable {
                        $this->shutdownSocket($mainSocket);
 
                        // And throw again
-                       throw new InvalidSocketException(array($this, $mainSocket, $socketError, $errorMessage), BaseListener::EXCEPTION_INVALID_SOCKET);
+                       throw new InvalidSocketException(array($this, $mainSocket, $socketError, $errorMessage), SocketHandler::EXCEPTION_INVALID_SOCKET);
                        */
                } // END - if
 
@@ -125,7 +125,7 @@ class UdpListener extends BaseListener implements Listenable {
                        $this->shutdownSocket($mainSocket);
 
                        // And throw again
-                       throw new InvalidSocketException(array($this, $mainSocket, $socketError, $errorMessage), BaseListener::EXCEPTION_INVALID_SOCKET);
+                       throw new InvalidSocketException(array($this, $mainSocket, $socketError, $errorMessage), SocketHandler::EXCEPTION_INVALID_SOCKET);
                        */
                } // END - if
 
index 192c54fb195599b047316f13da3c5c3268edc956..21d7fd11036dc2d8067333676fb7375e3179bc6d 100644 (file)
@@ -28,6 +28,9 @@ class PackageAssembler extends BaseHubSystem implements Assembler, Registerable,
         */
        const STACKER_NAME_MULTIPLE_MESSAGE = 'multiple_message';
 
+       // Exception codes
+       const EXCEPTION_UNSUPPORTED_PACKAGE_CODE_HANDLER = 0xf2200;
+
        /**
         * Pending data
         */
@@ -143,7 +146,7 @@ class PackageAssembler extends BaseHubSystem implements Assembler, Registerable,
                // Abort if the call-back method is not there
                if (!method_exists($this, $this->callbacks[$packageContent[BaseRawDataHandler::PACKAGE_ERROR_CODE]])) {
                        // Throw an exception
-                       throw new UnsupportedPackageCodeHandlerException(array($this, $this->callbacks[$packageContent[BaseRawDataHandler::PACKAGE_ERROR_CODE]], $packageContent), BaseListener::EXCEPTION_UNSUPPORTED_PACKAGE_CODE_HANDLER);
+                       throw new UnsupportedPackageCodeHandlerException(array($this, $this->callbacks[$packageContent[BaseRawDataHandler::PACKAGE_ERROR_CODE]], $packageContent), self::EXCEPTION_UNSUPPORTED_PACKAGE_CODE_HANDLER);
                } // END - if
 
                // Call it back
index 620e147281695a5e14b192657ddfef5c0e89ee51..c60064e4dc0ca3b1b62b39e581e2daa604097d35 100644 (file)
@@ -260,6 +260,12 @@ class NetworkPackage extends BaseHubSystem implements Deliverable, Receivable, R
        const PROTOCOL_TCP = 'TCP';
        const PROTOCOL_UDP = 'UDP';
 
+       /**************************************************************************
+        *                           Exception codes                              *
+        **************************************************************************/
+       const EXCEPTION_UNEXPECTED_PACKAGE_STATUS = 0xff00;
+       const EXCEPTION_INVALID_DATA_CHECKSUM     = 0xff01;
+
        /**
         * Protected constructor
         *
@@ -992,7 +998,7 @@ class NetworkPackage extends BaseHubSystem implements Deliverable, Receivable, R
                        $this->handleSocketError(__METHOD__, __LINE__, $encodedDataArray[self::RAW_SOCKET_INDEX], array('0.0.0.0', '0'));
 
                        // And throw it
-                       throw new InvalidSocketException(array($this, $encodedDataArray[self::RAW_SOCKET_INDEX], $socketError, $errorMessage), BaseListener::EXCEPTION_INVALID_SOCKET);
+                       throw new InvalidSocketException(array($this, $encodedDataArray[self::RAW_SOCKET_INDEX], $socketError, $errorMessage), SocketHandler::EXCEPTION_INVALID_SOCKET);
                } elseif (($sentBytes === 0) && (strlen($encodedDataArray[self::RAW_ENCODED_DATA_INDEX]) > 0)) {
                        // Nothing sent means we are done
                        //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('CONNECTION-HELPER[' . __METHOD__ . ':' . __LINE__ . ']: All sent! (LINE=' . __LINE__ . ')');
@@ -1268,7 +1274,7 @@ class NetworkPackage extends BaseHubSystem implements Deliverable, Receivable, R
                // Is the package status 'failed'?
                if ($packageData[self::PACKAGE_DATA_STATUS] != self::PACKAGE_STATUS_FAILED) {
                        // Not failed!
-                       throw new UnexpectedPackageStatusException(array($this, $packageData, self::PACKAGE_STATUS_FAILED), BaseListener::EXCEPTION_UNEXPECTED_PACKAGE_STATUS);
+                       throw new UnexpectedPackageStatusException(array($this, $packageData, self::PACKAGE_STATUS_FAILED), self::EXCEPTION_UNEXPECTED_PACKAGE_STATUS);
                } // END - if
 
                // Remove this entry
@@ -1347,7 +1353,7 @@ class NetworkPackage extends BaseHubSystem implements Deliverable, Receivable, R
                // Is the checksum valid?
                if (!$this->isChecksumValid($decodedContent, $decodedData)) {
                        // Is not the same, so throw an exception here
-                       throw new InvalidDataChecksumException(array($this, $decodedContent, $decodedData), BaseListener::EXCEPTION_INVALID_DATA_CHECKSUM);
+                       throw new InvalidDataChecksumException(array($this, $decodedContent, $decodedData), self::EXCEPTION_INVALID_DATA_CHECKSUM);
                } // END - if
 
                /*
index 90e76fde8207dbfc8aa8677ea609af4b916feca7..d4f02dba3519dc54314143957abcd51a9b866a9d 100644 (file)
@@ -60,7 +60,7 @@ class DefaultPeerPool extends BasePool implements PoolablePeer {
                // Is it a valid resource?
                if (!is_resource($socketResource)) {
                        // Throw an exception
-                       throw new InvalidSocketException(array($this, $socketResource), BaseListener::EXCEPTION_INVALID_SOCKET);
+                       throw new InvalidSocketException(array($this, $socketResource), SocketHandler::EXCEPTION_INVALID_SOCKET);
                } // END - if
 
                // Get error code
@@ -78,7 +78,7 @@ class DefaultPeerPool extends BasePool implements PoolablePeer {
                        $this->getListenerInstance()->shutdownSocket($socketResource);
 
                        // And throw again
-                       throw new InvalidSocketException(array($this, $socketResource, $errorCode, $errorMessage), BaseListener::EXCEPTION_INVALID_SOCKET);
+                       throw new InvalidSocketException(array($this, $socketResource, $errorCode, $errorMessage), SocketHandler::EXCEPTION_INVALID_SOCKET);
                        */
                } // END - if
        }
@@ -119,7 +119,7 @@ class DefaultPeerPool extends BasePool implements PoolablePeer {
                                $lastError = socket_last_error($socketResource);
 
                                // Doesn't work!
-                               throw new InvalidSocketException(array($this, $socketResource, $lastError, socket_strerror($lastError)), BaseListener::EXCEPTION_INVALID_SOCKET);
+                               throw new InvalidSocketException(array($this, $socketResource, $lastError, socket_strerror($lastError)), SocketHandler::EXCEPTION_INVALID_SOCKET);
                                */
                        } // END - if
                } else {
index 4429f1b91b155910201b3f58a154b71620effc5b..082be9f325d6de81a1a4a9a716691cb4d6dc58e3 100644 (file)
@@ -73,7 +73,7 @@ class PeerStateResolver extends BaseStateResolver implements StateResolver {
                        // Still no socket resource?
                        if (!is_resource($socketResource)) {
                                // Then abort here with an exception (may happen after socket_shutdown())
-                               throw new InvalidSocketException(array($helperInstance, $socketResource, 'unknown', 'unknown'), BaseListener::EXCEPTION_INVALID_SOCKET);
+                               throw new InvalidSocketException(array($helperInstance, $socketResource, 'unknown', 'unknown'), SocketHandler::EXCEPTION_INVALID_SOCKET);
                        } // END - if
                } // END - if
 
diff --git a/application/hub/interfaces/pool/.htaccess b/application/hub/interfaces/pool/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/hub/interfaces/pool/class_Poolable.php b/application/hub/interfaces/pool/class_Poolable.php
deleted file mode 100644 (file)
index 830430f..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-<?php
-/**
- * An interface for pools
- *
- * @author             Roland Haeder <webmaster@shipsimu.org>
- * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 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 Poolable extends FrameworkInterface {
-}
-
-// [EOF]
-?>
diff --git a/application/hub/interfaces/pool/listener/.htaccess b/application/hub/interfaces/pool/listener/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/hub/interfaces/pool/listener/class_PoolableListener.php b/application/hub/interfaces/pool/listener/class_PoolableListener.php
deleted file mode 100644 (file)
index b0e7f16..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-<?php
-/**
- * An interface for pools
- *
- * @author             Roland Haeder <webmaster@shipsimu.org>
- * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 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 PoolableListener extends Poolable {
-       /**
-        * Adds a listener instance to this pool
-        *
-        * @param       $listenerInstance       An instance of a Listenable class
-        * @return      void
-        */
-       function addListener (Listenable $listenerInstance);
-}
-
-// [EOF]
-?>
diff --git a/application/hub/interfaces/pool/peer/.htaccess b/application/hub/interfaces/pool/peer/.htaccess
deleted file mode 100644 (file)
index 3a42882..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Deny from all
diff --git a/application/hub/interfaces/pool/peer/class_PoolablePeer.php b/application/hub/interfaces/pool/peer/class_PoolablePeer.php
deleted file mode 100644 (file)
index 7920c38..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-<?php
-/**
- * A default peer pool class
- *
- * @author             Roland Haeder <webmaster@shipsimu.org>
- * @version            0.0.0
- * @copyright  Copyright (c) 2007, 2008 Roland Haeder, 2009 - 2015 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);
-}
-
-// [EOF]
-?>