]> git.mxchange.org Git - hub.git/blobdiff - application/hub/main/nodes/class_BaseHubNode.php
Rewrites, some more methods:
[hub.git] / application / hub / main / nodes / class_BaseHubNode.php
index 8f3d1864dae58a8d8f9031beadfe1a56ca9361d1..f5b854b27411351a6cbc0748c4123f5f592a10b0 100644 (file)
@@ -573,7 +573,7 @@ class BaseHubNode extends BaseHubSystem implements Updateable {
                 * All nodes can now use the same configuration entry because it can be
                 * customized in config-local.php.
                 */
-               $listenerInstance->setListenPortByConfiguration('node_tcp_listen_port');
+               $listenerInstance->setListenPortByConfiguration('node_listen_port');
 
                // Initialize the listener
                $listenerInstance->initListener();
@@ -600,7 +600,7 @@ class BaseHubNode extends BaseHubSystem implements Updateable {
                 * All nodes can now use the same configuration entry because it can be
                 * customized in config-local.php.
                 */
-               $listenerInstance->setListenPortByConfiguration('node_udp_listen_port');
+               $listenerInstance->setListenPortByConfiguration('node_listen_port');
 
                // Initialize the listener
                $listenerInstance->initListener();
@@ -723,15 +723,11 @@ class BaseHubNode extends BaseHubSystem implements Updateable {
        /**
         * "Getter" for address:port combination
         *
-        * @param       $handlerInstance        An instance of a Networkable class
-        * @return      $addressPort            A address:port combination for this node
+        * @return      $addressPort    A address:port combination for this node
         */
-       public final function getAddressPort (Networkable $handlerInstance) {
-               // Construct config entry
-               $configEntry = 'node_' . $handlerInstance->getHandlerName() . '_listen_port';
-
+       public final function getAddressPort () {
                // Get IP and port
-               $addressPort = $this->getConfigInstance()->detectServerAddress() . ':' . $this->getConfigInstance()->getConfigEntry($configEntry);
+               $addressPort = $this->getConfigInstance()->detectServerAddress() . ':' . $this->getConfigInstance()->getConfigEntry('node_listen_port');
 
                // Return it
                return $addressPort;