use of me.matoosh.undernet.p2p.config.NetworkConfig in project UnderNet by itsMatoosh.
the class UnderNet method setup.
/**
* Sets up UnderNet.
*/
public static void setup(FileManager fileManager, ConfigurationProvider configProvider) {
// Writing the init message.
writeInitMessage();
// Setting the secure random generator.
secureRandom = new SecureRandom();
// Setting the file manager.
UnderNet.fileManager = fileManager;
// Setting the config provider.
UnderNet.configProvider = configProvider;
networkConfig = configProvider.bind("network", NetworkConfig.class);
// Loading up the node cache.
EntryNodeCache.registerEvents();
EntryNodeCache.load();
// Setting up the self node.
Node.self = new Node();
// Setting up the router.
router = new Router();
router.setup();
}
Aggregations