fix(core): update

This commit is contained in:
2019-09-06 18:26:32 +02:00
parent 311852efe8
commit beb6680856
8 changed files with 509 additions and 376 deletions

View File

@ -22,21 +22,25 @@ network diagnostics
import * as smartnetwork from 'smartnetwork';
const testSmartNetwork = new smartnetwork.SmartNetwork();
const run = async () => {
// measure average speed over a period of 5 seconds
// the structure of speedResult is self explanatory using TypeScript (or the linked TypeDoc above)
const speedResult = testSmartNetwork.getSpeed(5000)
const speedResult = testSmartNetwork.getSpeed(5000);
//
const isLocalPortAvailable: boolean = await testSmartNetwork.isLocalPortAvailable(1234);
const isRemotePortAvailable: boolean = await testSmartNetwork.isRemotePortAvailable('google.com:80');
const isRemotePortAvailable: boolean = await testSmartNetwork.isRemotePortAvailable('google.com', 80);
}
const isRemotePortAvailable: boolean = await testSmartNetwork.isRemotePortAvailable(
'google.com:80'
);
const isRemotePortAvailable: boolean = await testSmartNetwork.isRemotePortAvailable(
'google.com',
80
);
};
```
For further information read the linked docs at the top of this readme.
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy.html)
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy)
[![repo-footer](https://pushrocks.gitlab.io/assets/repo-footer.svg)](https://maintainedby.lossless.com)
[![repo-footer](https://lossless.gitlab.io/publicrelations/repofooter.svg)](https://maintainedby.lossless.com)