// Set the request instance
$nodeInstance->setRequestInstance($requestInstance);
+ // --------------------- Hub-id acquirement phase ---------------------
+ // Acquire a hub-id. This step generates on first launch a new one and
+ // on any later launches it will restore the hub-id from the database.
+ // A passed 'nickname=xxx' argument will be used to add some
+ // 'personality' to the hub.
+ $nodeInstance->acquireHubId();
+
// Return the instance
return $nodeInstance;
}
* @todo add some more special bootstrap things for this boot node
*/
public function doBootstrapping () {
- // Call generic (parent) bootstrapping method
+ // Call generic (parent) bootstrapping method first
parent::doGenericBootstrapping();
// Now check if the IP address matches one of the bootstrap nodes
if ($this->ifAddressMatchesBootstrappingNodes($_SERVER['REMOTE_ADDR'])) {
- // Get our port
+ // Get our port from configuration
$ourPort = $this->getConfigInstance()->readConfig('node_listen_port');
// Is the port the same?
} // END - if
// This might not be all...
- $this->partialStub("Please implement more bootsrapping steps.");
+ $this->partialStub('Please implement more bootsrapping steps.');
+
+ // This should be the last thing to do: output teaser lines
+ $this->outputConsoleTeaser();
}
}