Socket
Socket
Sign inDemoInstall

lightstreamer-client-node

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lightstreamer-client-node

This package includes the resources needed to write a Lightstreamer client.


Version published
Weekly downloads
169
increased by4.32%
Maintainers
1
Weekly downloads
 
Created
Source

Lightstreamer Client Node.js SDK

The Lightstreamer Client Node.js SDK enables any Node.js application to communicate bidirectionally with a Lightstreamer server. The API allows to subscribe to real-time data pushed by a server and to send any message to the server.

Use

Install the package using npm

npm install lightstreamer-client-node

The SDK for Node.js Clients allows you to develop JavaScript applications by using the same API already provided by the SDK for Web Clients.

You can start writing your application by loading lightstreamer-client-node module as in the following example. Alternatively, you can load a minified version of the library by requiring lightstreamer-client-node/lightstreamer-node.min module.

var Ls = require('lightstreamer-client-node');

var sub = new Ls.Subscription("MERGE",["item1","item2","item3"],["stock_name","last_price"]);
sub.setDataAdapter("QUOTE_ADAPTER");
sub.setRequestedSnapshot("yes");
sub.addListener({
    onItemUpdate: function(obj) {
      console.log(obj.getValue("stock_name") + ": " + obj.getValue("last_price"));
    }
});
var client = new Ls.LightstreamerClient("http://push.lightstreamer.com","DEMO");  
client.connect();
client.subscribe(sub);

Compatibility

The library requires Server 7.0.

Documentation

  • API Reference
  • Demos

Keywords

FAQs

Package last updated on 01 Apr 2022

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