*/
// Debug output (may flood)
- /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('RECIPIENT-DISCOVERY[' . __METHOD__ . ':' . __LINE__ . ']: Recipient matches own ip (' . HubTools::determineOwnExternalAddress() . ' or ' . HubTools::determineOwnInternalAddress() . ')');
+ /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('RECIPIENT-DISCOVERY[' . __METHOD__ . ':' . __LINE__ . ']: Recipient matches own ip (external=' . HubTools::determineOwnExternalAddress() . ' or internal=' . HubTools::determineOwnInternalAddress() . ')');
} else {
// Debug output (may flood)
/* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('RECIPIENT-DISCOVERY[' . __METHOD__ . ':' . __LINE__ . ']: Recipient is different than own external address (' . HubTools::determineOwnExternalAddress() . ') nor internal address (' . HubTools::determineOwnInternalAddress() . '), need to forward (not yet implemented)!');
* @return $unl The determined internal UNL of this node
*/
public static function determineOwnInternalAddress () {
+ // Debug message
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('NODE[' . __METHOD__ . ':' . __LINE__ . ']: CALLED!');
+
// Is the internal_address config entry set?
if (FrameworkConfiguration::getSelfInstance()->getConfigEntry('allow_publish_internal_address') == 'N') {
+ // Debug message
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('NODE[' . __METHOD__ . ':' . __LINE__ . ']: Calling self::determineOwnExternalAddress() as allow_publish_internal_address=N is set ...');
+
// Not allowed to publish internal address, so use external
$unl = self::determineOwnExternalAddress();
} elseif (FrameworkConfiguration::getSelfInstance()->getConfigEntry('internal_address') != '') {
+ // Debug message
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('NODE[' . __METHOD__ . ':' . __LINE__ . ']: Getting config entry internal_address ...');
+
// Use it as internal address
$unl = FrameworkConfiguration::getSelfInstance()->getConfigEntry('internal_address');
} else {
- // Determine own internal address by connecting to my (coder) server at 188.138.90.169
+ // Debug message
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('NODE[' . __METHOD__ . ':' . __LINE__ . ']: Calling self::determineInternalUniversalNodeLocator() ...');
+
+ // Determine own internal address
$unl = self::determineInternalUniversalNodeLocator();
}
+ // Debug message
+ //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('NODE[' . __METHOD__ . ':' . __LINE__ . ']: unl=' . $unl . ' - EXIT!');
+
// Return it
return $unl;
}
Array
(
[node_mode] => regular
- [external_address] => 192.168.2.3
- [listen_port] => 9061
+ [external_address] => tcp://192.168.2.3:9060
[node_id] => 38fc625d3d9aa05654bfc90a7aea7ff72c883f1573
[session_id] => 38fc625d3dabe9ff09b54253b298e91985191472a3
[private_key_hash] => 38fc625d3dad67db034d7e715fae8b8ea47fefb0dc