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

ppq

Package Overview
Dependencies
Maintainers
2
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ppq

Push/Pull TCP Messaging

  • 0.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

ppq

Push/Pull TCP Messaging. Somewhat inspired by punt.

install

$ npm install ppq

usage

Pull server

var pull = require('ppq/pull')
var server = pull(3000);

server.on('message', function (msg) {
  console.log(msg);
});

Push client

var push = require('ppq/push');
var a = push('0.0.0.0:3000');
var b = push('0.0.0.0:3000');

setInterval(function () {
  a.send('kinkajou');
}, 500);

setInterval(function () {
  b.send('panda');
}, 800);

api

pull(port)

Returns a readable and writable stream listening on port.

#close

Closes the server listening on port.

push(addr)

Returns a readable and writable stream bound to addr.

#send

Sends an arbitrary message to bound addr.

license

MIT

Keywords

FAQs

Package last updated on 07 Jul 2014

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