is-ready-tcp
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

is-ready-tcp

is-ready-tcp allows you to easy await and check any tcp service connection

Installation

npm i is-ready-tcp

Usage

const isReadyTcp = require( 'is-ready-tcp' );
( async () => {
    try {
        await isReadyTcp( 3000 );

        // Success
        // You can connect to your service

    } catch ( error ) {
        // Connection timeout reached
    }
} )();

Parameters

isReadyTcp( port: Integer [, host: String = 'localhost' [, timeOutSeconds: Number = 30 [, intervalAttemptsSeconds: Number = 1 ]]] )

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.3
    12
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.3
    12
  • 1.0.2
    3
  • 1.0.1
    2
  • 1.0.0
    1

Package Sidebar

Install

npm i is-ready-tcp

Weekly Downloads

2

Version

1.0.3

License

GPL-3.0-or-later

Unpacked Size

37.9 kB

Total Files

5

Last publish

Collaborators

  • angy91m