* 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();
* 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();
/**
* "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;