0.2.2 • Published 6 years ago

sc-publish-out-queue v0.2.2

Weekly downloads
4
License
ISC
Repository
github
Last release
6 years ago

SC Publish Out Queue

Change Log

0.2.2 - Nov 27, 2017 - Check to see if socket is connected before emiting back.

Installation

npm install sc-publish-out-queue --save

Usage

let scPublishOutHandler = require('sc-publish-out-queue')

scPublishOutHandler.attach(worker,{
	debug:true,				// Defaults to false
	timeout:100, 			// in milliseconds; defaults to 10
	numOfMessagesPerPass 	// Num of packets it will clear at a time; defaults to 100
})

Example

There is an example in the sample folder. You need to first spin up a state server and a broker. You can just clone the socketcluster repos for this if you want. Then npm start the sample folder. Open up a browser to localhost:8000. Open your dev tools and send a socket.publish('send-data',{ id:1 }) and every client that's connected will see this message only once per a publish. The system is ALIVE! Thanks!

0.2.2

6 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago

0.0.2

7 years ago