]> git.mxchange.org Git - hub.git/blobdiff - application/hub/main/nodes/class_BaseHubNode.php
ListenerPool added with Poolable interface (should we change the name of the interface?)
[hub.git] / application / hub / main / nodes / class_BaseHubNode.php
index a52541a2e8e8119cb2d1ed7a61875f3d17cf3e0a..77c80e084f97e909ef22fd3fee1f42cdb15205b4 100644 (file)
@@ -334,10 +334,18 @@ class BaseHubNode extends BaseHubSystem implements Updateable {
                $this->listenerPoolInstance = ObjectFactory::createObjectByConfiguredName('listener_pool_class', array($this));
 
                // Initialize the TCP listener
-               $tcpListenerInstance = ObjectFactory::createObjectByConfiguredName('tcp_listener_class', array($this));
+               $listenerInstance = ObjectFactory::createObjectByConfiguredName('tcp_listener_class', array($this));
+
+               // Setup address and port
+               $listenerInstance->setListenAddressByConfiguration('node_listen_addr');
+               $listenerInstance->setListenPortByConfiguration('node_tcp_listen_port');
 
                // Initialize the UDP listener
-               $udpListenerInstance = ObjectFactory::createObjectByConfiguredName('udp_listener_class', array($this));
+               $listenerInstance = ObjectFactory::createObjectByConfiguredName('udp_listener_class', array($this));
+
+               // Setup address and port
+               $listenerInstance->setListenAddressByConfiguration('node_listen_addr');
+               $listenerInstance->setListenPortByConfiguration('node_udp_listen_port');
        }
 }