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

socketmq

Package Overview
Dependencies
Maintainers
2
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

socketmq - npm Package Compare versions

Comparing version 0.6.1 to 0.6.2

3

lib/queue/channel.js

@@ -11,2 +11,3 @@ var type = require('../message/type')

var AIN = type.AIN
var SID = type.SID

@@ -83,2 +84,4 @@ var QueueChannel = module.exports = function QueueChannel(socket, ns, name) {

meta[MCH] = pack.chn || queue.chn
if (pack.sid)
meta[SID] = pack.sid
if (!meta[MCH])

@@ -85,0 +88,0 @@ throw new Error('Channel name is required for sending channel message.')

@@ -52,2 +52,7 @@ var type = require('../message/type')

// In case we have SID in meta we only want to send to the stream which has
// SID as one of its tag.
if (meta[SID])
_streams = this.getStreamsBySid(meta[SID], _streams)
var len = _streams.length

@@ -145,4 +150,3 @@ if (0 === len)

// Let's find our untrusted stream first.
var sidTag = prefixTags(SID, meta[SID])
var sidStreams = this.socket.getStreamsByTag(sidTag)
var sidStreams = this.getStreamsBySid(meta[SID])
if (1 === sidStreams.length) {

@@ -214,2 +218,8 @@ var sidStream = sidStreams[0]

QueueGateway.prototype.getStreamsBySid = function(sid, streams) {
var sidTag = prefixTags(SID, sid)
var sidStreams = this.socket.getStreamsByTag(sidTag, streams)
return 1 === sidStreams.length ? sidStreams : []
}
QueueGateway.prototype.beforeDispatch = function(pack, stream, dispatch) {

@@ -216,0 +226,0 @@ dispatch(pack, stream)

@@ -36,2 +36,11 @@ var que = require('./que')

SocketChannel.prototype.pubSid = function(sid, event, msg) {
var args = que.getArgs(arguments, msg, 2, 1, 3)
this.queue.pub(this.streams, {
sid: sid,
event: event,
msg: args.msg
})
}
SocketChannel.prototype.allow = function(allowFn) {

@@ -38,0 +47,0 @@ this.queue.allow = allowFn

2

package.json
{
"name": "socketmq",
"version": "0.6.1",
"version": "0.6.2",
"description": "Lightweight stream-oriented messaging library for node.",

@@ -5,0 +5,0 @@ "main": "index.js",

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