Socket
Socket
Sign inDemoInstall

fail

Package Overview
Dependencies
1
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    fail

Generic failure detector for connections


Version published
Weekly downloads
4
decreased by-75%
Maintainers
1
Install size
12.0 kB
Created
Weekly downloads
 

Readme

Source

fail

A failure detector is a tracker that receives events from multiple TCP connections and manages timeouts locally so that failed servers are detected - works with multiple connections.

API

  • .connecting(to): if you are the initiating party, call this; sets a timeout on the connection
  • .connected(to): call this when the connection is established (either on the client, or on the server)
  • .receive(from): call this for each message received from the other party (request or response)
  • .ungracefulDisconnectFn(from): returns a function that you can pass to .on('close'); triggers a disconnect if this occurs unexpectedly
  • .disconnect(from): call this for a graceful disconnect
  • .timeouts(): run the timeout interval manually

Keywords

FAQs

Last updated on 20 Nov 2012

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc