fix(core): update
This commit is contained in:
10
readme.md
10
readme.md
@ -31,13 +31,17 @@ 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: smartnetwork.SpeedResult = testSmartNetwork.getSpeed(5000);
|
||||
|
||||
//
|
||||
const isLocalPortAvailable: boolean = await testSmartNetwork.isLocalPortAvailable(1234);
|
||||
// you can check for local ports before trying to bind to it from your nodejs program
|
||||
const isLocalPortUnused: boolean = await testSmartNetwork.isLocalPortUnused(1234);
|
||||
|
||||
// you can run basic port checks on remote domains.
|
||||
const isRemotePortAvailable: boolean = await testSmartNetwork.isRemotePortAvailable(
|
||||
'google.com:80'
|
||||
);
|
||||
|
||||
// just another way to call for the same thing as above
|
||||
const isRemotePortAvailable: boolean = await testSmartNetwork.isRemotePortAvailable(
|
||||
'google.com',
|
||||
80
|
||||
|
Reference in New Issue
Block a user