]> git.mxchange.org Git - hub.git/blobdiff - application/hub/main/listener/tcp/class_TcpListener.php
Error code 'empty_data' is now fully removed and empty data is being silently ignored...
[hub.git] / application / hub / main / listener / tcp / class_TcpListener.php
index c0b98e413f0150a125fd04bc5b1a147ebe185407..8c8afa8908faed81aad0136cc2c701a6a433c985 100644 (file)
@@ -306,14 +306,14 @@ class TcpListener extends BaseListener implements Listenable {
                // Get the current value
                $currentSocket = $this->getIteratorInstance()->current();
 
-               // Handle it here, if not main socket
-               /* NOISY-DEBUG: */ $this->debugOutput('TCP-LISTENER: currentSocket=' . $currentSocket[BasePool::SOCKET_ARRAY_RESOURCE] . ',type=' . $currentSocket[BasePool::SOCKET_ARRAY_CONN_TYPE] . ',serverSocket=' . $this->getSocketResource());
+               // Handle it here, if not main server socket
+               //* NOISY-DEBUG: */ $this->debugOutput('TCP-LISTENER: currentSocket=' . $currentSocket[BasePool::SOCKET_ARRAY_RESOURCE] . ',type=' . $currentSocket[BasePool::SOCKET_ARRAY_CONN_TYPE] . ',serverSocket=' . $this->getSocketResource());
                if (($currentSocket[BasePool::SOCKET_ARRAY_CONN_TYPE] != BaseConnectionHelper::CONNECTION_TYPE_SERVER) && ($currentSocket[BasePool::SOCKET_ARRAY_RESOURCE] != $this->getSocketResource())) {
                        // ... or else it will raise warnings like 'Transport endpoint is not connected'
                        $this->getHandlerInstance()->processRawDataFromResource($currentSocket);
                } // END - if
 
-               // Advance to next entry. This should be the last line
+               // Advance to next entry. This should be the last line.
                $this->getIteratorInstance()->next();
        }
 
@@ -322,9 +322,11 @@ class TcpListener extends BaseListener implements Listenable {
         *
         * @param       $packageData    Raw package data
         * @return      $accepts                Whether this listener does accept
+        * @throws      UnsupportedOperationException   If this method is called
         */
        public function ifListenerAcceptsPackageData (array $packageData) {
-               $this->debugBackTrace('This call should not happen. Please report it.');
+               // Please don't call this
+               throw new UnsupportedOperationException(array($this, __FUNCTION__), self::EXCEPTION_UNSPPORTED_OPERATION);
        }
 }