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

fanoutpub

Package Overview
Dependencies
Maintainers
3
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fanoutpub

Fanout Pubsub Protocol Library

  • 1.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
171
decreased by-3.39%
Maintainers
3
Weekly downloads
 
Created
Source

Fanout.io Library for NodeJS

Author: Katsuyuki Ohmuro harmony7@pex2.jp, Konstantin Bokarius kon@fanout.io

Description

Fanout Pubsub Protocol library for NodeJS.

The Fanout pubsub protocol is used to send simple realtime messages over a communications channel. This library has been designed for use with the Fanout.io pubsub service.

This library implements the JsonObject format as a custom data format for pubcontrol, an EPCP library for NodeJS. These data objects created using node fanoutpub may also be used with pubcontrol's publisher if desired.

This library also provides some convenience methods that provide simple ways to set up a publisher when working with the Fanout service.

Requirements

pubcontrol

Sample Usage

The simple usage of node-fanoutpub is with the Fanout.io service. This usage requires a realm name and a base64-encoded realm key, which are available to users of the Fanout service.

var fanout = require('fanoutpub');

var callback = function(success, message, context) {
    if (success) {
        console.log('Publish successful!');
    }
    else {
        console.log('Publish failed!');
        console.log('Message: ' + message);
        console.log('Context: ');
        console.dir(context); 
    }
};

var fanout = new fanout.Fanout('<myrealm>', '<myrealmkey>');
fanout.publish('<channel>', 'Test Publish!', callback);

License

(C) 2015 Fanout, Inc.
Licensed under the MIT License, see file COPYING for details.

Keywords

FAQs

Package last updated on 25 Mar 2015

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