const PACKAGE_RECIPIENT_SEPARATOR = ':';
/**
- * Network target (alias): 'upper nodes'
+ * Recipient type 'upper nodes'
*/
- const NETWORK_TARGET_UPPER = 'upper';
+ const RECIPIENT_TYPE_UPPER = 'upper';
/**
- * Network target (alias): 'self'
+ * Recipient type 'self'
*/
- const NETWORK_TARGET_SELF = 'self';
+ const RECIPIENT_TYPE_SELF = 'self';
/**
- * Network target (alias): 'dht'
+ * Recipient type 'dht'
*/
- const NETWORK_TARGET_DHT = 'dht';
+ const RECIPIENT_TYPE_DHT = 'dht';
/**
- * Network target (alias): 'direct'
+ * Recipient type 'direct'
*/
- const NETWORK_TARGET_DIRECT = 'direct';
+ const RECIPIENT_TYPE_DIRECT = 'direct';
/**
* TCP package size in bytes
$packageInstance->setSenderAddress($decodedArray[self::INDEX_PACKAGE_SENDER_ADDRESS]);
$packageInstance->setSenderPort($decodedArray[self::INDEX_PACKAGE_SENDER_PORT]);
$packageInstance->setRecipientId($decodedArray[self::INDEX_PACKAGE_RECIPIENT]);
- $packageInstance->setRecipientType(self::NETWORK_TARGET_DIRECT);
+ $packageInstance->setRecipientType(self::RECIPIENT_TYPE_DIRECT);
$packageInstance->setPackageContent($decodedArray[self::INDEX_PACKAGE_CONTENT]);
$packageInstance->setStatus(self::PACKAGE_STATUS_DECODED);
$packageInstance->setContentHash($decodedArray[self::INDEX_PACKAGE_HASH]);
parent::__construct(__CLASS__);
// Set recipient type
- $this->setRecipientType(NetworkPackageHandler::NETWORK_TARGET_DHT);
+ $this->setRecipientType(NetworkPackageHandler::RECIPIENT_TYPE_DHT);
// Set package tags
$this->setPackageTags(array('dht_bootstrap'));
parent::__construct(__CLASS__);
// Set recipient type
- $this->setRecipientType(NetworkPackageHandler::NETWORK_TARGET_DHT);
+ $this->setRecipientType(NetworkPackageHandler::RECIPIENT_TYPE_DHT);
// Set package tags
$this->setPackageTags(array('dht_publish_entry'));
parent::__construct(__CLASS__);
// Set recipient type
- $this->setRecipientType(NetworkPackageHandler::NETWORK_TARGET_UPPER);
+ $this->setRecipientType(NetworkPackageHandler::RECIPIENT_TYPE_UPPER);
// Set package tags
$this->setPackageTags(array('announcement'));
$helperInstance = new NodeAnnouncementMessageAnswerHelper();
// Set session id of other peer as recipient
- $helperInstance->setRecipientType(NetworkPackageHandler::NETWORK_TARGET_DIRECT);
+ $helperInstance->setRecipientType(NetworkPackageHandler::RECIPIENT_TYPE_DIRECT);
$helperInstance->setRecipientId($messageData[XmlAnnouncementTemplateEngine::ANNOUNCEMENT_DATA_SESSION_ID]);
// Set message data
$helperInstance = new NodeDhtBootstrapMessageAnswerHelper();
// Set session id of other peer as recipient
- $helperInstance->setRecipientType(NetworkPackageHandler::NETWORK_TARGET_DIRECT);
+ $helperInstance->setRecipientType(NetworkPackageHandler::RECIPIENT_TYPE_DIRECT);
$helperInstance->setRecipientId($messageData[XmlDhtBootstrapTemplateEngine::DHT_BOOTSTRAP_DATA_SESSION_ID]);
// Set message data
$helperInstance = new NodeRequestNodeListMessageAnswerHelper();
// Set session id of other peer as recipient
- $helperInstance->setRecipientType(NetworkPackageHandler::NETWORK_TARGET_DIRECT);
+ $helperInstance->setRecipientType(NetworkPackageHandler::RECIPIENT_TYPE_DIRECT);
$helperInstance->setRecipientId($messageData[XmlRequestNodeListTemplateEngine::REQUEST_DATA_SESSION_ID]);
// Set message data
parent::__construct(__CLASS__);
// Set recipient type
- $this->setRecipientType(NetworkPackageHandler::NETWORK_TARGET_SELF);
+ $this->setRecipientType(NetworkPackageHandler::RECIPIENT_TYPE_SELF);
// Set package tags
$this->setPackageTags(array(Tagable::TAG_SELF_CONNECT));
parent::__construct(__CLASS__);
// Set recipient type
- $this->setRecipientType(NetworkPackageHandler::NETWORK_TARGET_UPPER);
+ $this->setRecipientType(NetworkPackageHandler::RECIPIENT_TYPE_UPPER);
// Set package tags
$this->setPackageTags(array('request_node_list'));
// Make sure the recipient is valid
/* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('DHT-RECIPIENT: recipientUnl=' . $recipientUnl);
- assert($recipientUnl == NetworkPackageHandler::NETWORK_TARGET_DHT);
+ assert($recipientUnl == NetworkPackageHandler::RECIPIENT_TYPE_DHT);
// Get recipient discovery instance
$discoverInstance = ObjectFactory::createObjectByConfiguredName('dht_recipient_discovery_class');
// Check recipient UNL
/* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('UPPER-RECIPIENT: recipientUnl=' . $recipientUnl);
- assert($recipientUnl == NetworkPackageHandler::NETWORK_TARGET_UPPER);
+ assert($recipientUnl == NetworkPackageHandler::RECIPIENT_TYPE_UPPER);
// Get all bootstrap nodes
foreach (explode(BaseHubSystem::BOOTSTRAP_NODES_SEPARATOR, $this->getConfigInstance()->getConfigEntry('hub_bootstrap_nodes')) as $unlData) {