const DHT_BOOTSTRAP_DATA_NODE_STATUS = 'my-status';
const DHT_BOOTSTRAP_DATA_EXTERNAL_IP = 'my-external-ip';
const DHT_BOOTSTRAP_DATA_INTERNAL_IP = 'my-internal-ip';
- const DHT_BOOTSTRAP_DATA_LISTEN_PORT = 'my-listen-port';
+ const DHT_BOOTSTRAP_DATA_LISTEN_PORT = 'my-listen-port';
+ const DHT_BOOTSTRAP_DATA_NODE_LIST = 'dht-node-list';
/**
* Protected constructor
'your-session-id',
// Answer status (generic field)
self::ANSWER_STATUS,
+ // DHT node list
+ self::DHT_BOOTSTRAP_DATA_NODE_LIST,
);
}
$this->getStackerInstance()->pushNamed('node_dht_bootstrap_answer', self::DHT_BOOTSTRAP_DATA_NODE_STATUS);
}
+ /**
+ * Starts the dht-node-list
+ *
+ * @return void
+ */
+ protected function startDhtNodeList () {
+ // Push the node name on the stacker
+ $this->getStackerInstance()->pushNamed('node_dht_bootstrap_answer', self::DHT_BOOTSTRAP_DATA_NODE_LIST);
+ }
+
+ /**
+ * Finishes the dht-node-list
+ *
+ * @return void
+ */
+ protected function finishDhtNodeList () {
+ // Pop the last entry
+ $this->getStackerInstance()->popNamed('node_dht_bootstrap_answer');
+ }
+
/**
* Finishes the my-status
*
<object-protocol>tcp</object-protocol>
<object-recipient-type>all</object-recipient-type>
</object-list-entry>
+ <object-list-entry>
+ <object-name>dht_bootstrap_answer</object-name>
+ <object-recipient-limitation>direct</object-recipient-limitation>
+ <object-max-spread>1</object-max-spread>
+ <object-protocol>tcp</object-protocol>
+ <object-recipient-type>hub</object-recipient-type>
+ </object-list-entry>
<object-list-entry>
<object-name>dht_publish_entry</object-name>
<object-recipient-limitation>all</object-recipient-limitation>