]> git.mxchange.org Git - hub.git/blobdiff - application/hub/main/listener/tcp/class_TcpListener.php
Network package handling added (unfinished)
[hub.git] / application / hub / main / listener / tcp / class_TcpListener.php
index d7d3de766a59e83fba57d87269b83170f3a94914..df8b0111d1812133db023bb80043a169baedb4f6 100644 (file)
@@ -143,6 +143,12 @@ class TcpListener extends BaseListener implements Listenable {
                $iteratorInstance->rewind();
                $this->setIteratorInstance($iteratorInstance);
 
+               // Initialize the network package handler
+               $packageInstance = ObjectFactory::createObjectByConfiguredName('tcp_network_package_handler_class');
+
+               // Set it in this class
+               $this->setPackageInstance($packageInstance);
+
                // Output message
                $this->debugOutput('LISTENER: TCP listener now ready on IP ' . $this->getListenAddress() . ', port ' . $this->getListenPort() . ' for service.');
        }
@@ -185,11 +191,10 @@ class TcpListener extends BaseListener implements Listenable {
                $current = $this->getIteratorInstance()->current();
 
                // Handle it here
-               $this->partialStub('current['.gettype($current).']='.$current);
+               $this->getPackageInstance()->processPackage($current);
 
                // Advance to next entry. This should be the last line
                $this->getIteratorInstance()->next();
-               die("OK!\n");
        }
 }