New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

cocaine

Package Overview
Dependencies
Maintainers
1
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cocaine - npm Package Compare versions

Comparing version 0.4.0 to 0.4.1-1

4

lib/client/base_service.js

@@ -32,2 +32,6 @@

},
removeSession: function(s){
var id = s._id
delete this._sessions[id]
},
_resetSessions: function(errno){

@@ -34,0 +38,0 @@ Object.keys(this._sessions).forEach(function(sid){

@@ -30,2 +30,6 @@

_this._done = true
if(_this._owner){
_this._owner.removeSession(_this)
_this._owner = null
}
var err = new Error('call timeout')

@@ -32,0 +36,0 @@ _this._cb(err)

@@ -33,2 +33,6 @@

_this._done = true
if(_this._owner){
_this._owner.removeSession(_this)
_this._owner = null
}
var err = new Error('call timeout')

@@ -35,0 +39,0 @@ _this.fiber.throwInto(err)

@@ -33,2 +33,6 @@

_this._done = true
if(_this._owner){
_this._owner.removeSession(_this)
_this._owner = null
}
var err = new Error('call timeout')

@@ -35,0 +39,0 @@ Promise.reject(_this.deferred, err)

@@ -25,2 +25,6 @@

_this._done = true
if(_this._owner){
_this._owner.removeSession(_this)
_this._owner = null
}
var err = new Error('call timeout')

@@ -27,0 +31,0 @@ }

2

lib/worker/worker.js

@@ -270,3 +270,3 @@

if(s){
s.pushError(code, msg)
s.pushError(code, message)
delete s._sessions[sid]

@@ -273,0 +273,0 @@ }

{
"name": "cocaine",
"version": "0.4.0",
"version": "0.4.1-1",
"description": "Node.js framework for Cocaine platform",

@@ -5,0 +5,0 @@ "author": "Cocaine Project <cocaine@yandex-team.ru>",

@@ -179,3 +179,3 @@

var cli = new require('cocaine').Client()
var app = cli.Service('the_app')
var app = cli.Service('the_app', 'app')

@@ -185,9 +185,34 @@ app.connect()

app.on('connect', function(){
app.enqueue('handle','anydata', function(err, result){
if(err) {
console.log('app error', err)
} else {
console.log('app response is', result)
}
})
var s = app.enqueue(
'http',
mp.pack(['GET', // http method
'/', // uri
'HTTP/1.0', // http version
[['some-header','value']], // tuple of header-value pairs
''])) // body of request
var header
var body = []
s.on('data', function(chunk){
console.log('reply chunk', chunk)
var data = mp.unpack(chunk)
console.log(' which decodes', data)
if(header === undefined){
console.log('header')
header = data
} else {
console.log('body chunk')
body.push(data)
}
})
s.on('end', function(){
console.log('reply done')
})
s.on('error', function(err){
console.log('reply error', err)
})
})

@@ -194,0 +219,0 @@

var mp = require('msgpack')
var cli = new (require('../lib/client/client').Client)(['apefront.tst.ape.yandex.net', 10053])
var cli = new (require('../lib/client/client').Client)(['coca', 10053])

@@ -6,0 +6,0 @@

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