Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ssb-conn-staging

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ssb-conn-staging

Module that manages potential and optional SSB peer connections

  • 0.0.4
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

ssb-conn-staging

Module that manages potential and optional peer connections. For use with the SSB CONN family of modules. See also ssb-conn-hub.

Visual metaphor: a bench with substitute players, idle and not actively in the game, optionally available and waiting for further instructions to join or not.

staging.png

Usage

This module is only used to create an SSB CONN plugin, not used directly by applications. A ConnStaging instance should be available on the CONN plugin, with the following API:

API

  • connStaging.stage(address, data): register a peer known by its address (string, must conform to the multiserver address convention) as a newly available peer for potential connections, and a data object argument. Returns a boolean indicating whether stage() succeeded or not.
  • connStaging.unstage(address): remove the potential peer from the staging database, by its address (string, must conform to the multiserver address convention). Returns a boolean indicating whether unstage() succeeded or not
  • connStaging.entries(): returns a new Iterator object that gives [address, data] pairs of the peers currently in staging
  • connStaging.liveEntries(): returns a pull-stream that emits an array of entries (like connStaging.entries(), but an array instead of an Iterator) everytime there are updates to the staging.
  • connStaging.listen(): returns a pull stream that notifies of connection events, as an object {type, address} where type is either 'staged' or 'unstaged'
  • connStaging.close(): terminates any used resources and listeners, in preparation to destroy this instance.

License

MIT

FAQs

Package last updated on 28 Jun 2019

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc