npm.io
1.0.0-alpha.9 • Published 2 years ago

@nikitajs/network

Licence
MIT
Version
1.0.0-alpha.9
Deps
1
Size
32 kB
Vulns
0
Weekly
0

Nikita "network" package

The "network" package provides Nikita actions for networking operations.

Usage

import "@nikitajs/network/register";
import nikita from "@nikitajs/core";

const {$status} = await nikita.network.tcp.wait({
  server: [
    { host: 'localhost', port: 8080 },
    { host: 'localhost', port: 8081 },
    { host: 'localhost', port: 8082 },
  ],
  quorum: true,
  interval: 200,
});
console.info("Network available on first connection attempt:", !$status);

Keywords