init method
void
init()
Initializes the Link. There is no guarantee that the link will be ready when this method returns. If the configure method is not called prior to calling this method, it is called.
This method handles the following:
Implementation
void init() {
if (!_configured) {
if (!configure()) {
return;
}
}
if (_initialized) {
return;
}
_initialized = true;
if (provider == null) {
provider = SimpleNodeProvider(null, profiles);
(provider as SimpleNodeProvider).setPersistFunction(saveAsync);
}
loadNodesFile();
void doRun() {
link = createHttpLink();
_ready = true;
if (_connectOnReady) {
connect();
}
}
doRun();
}