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

coap

Package Overview
Dependencies
Maintainers
1
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

coap - npm Package Compare versions

Comparing version 0.4.2 to 0.4.3

2

lib/server.js

@@ -150,3 +150,3 @@ const dgram = require('dgram')

sender.send(buf, packet.code === '0.00')
sender.send(buf, packet.ack || packet.reset)
})

@@ -153,0 +153,0 @@

{
"name": "coap",
"version": "0.4.2",
"version": "0.4.3",
"description": "A CoAP library for node modelled after 'http'",

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

@@ -574,3 +574,3 @@

it('should error if it does not receive an ack four times before ~247s', function(done) {
it('should not resend with a piggyback response', function(done) {
var messages = 0

@@ -581,3 +581,27 @@

res.end('42')
})
client.on('message', function(msg) {
messages++
})
setTimeout(function() {
expect(messages).to.eql(1)
done()
}, 45 * 1000)
fastForward(100, 45 * 1000)
})
it('should error if it does not receive an ack four times before ~247s', function(done) {
var messages = 0
send(generate(packet))
server.on('request', function(req, res) {
// needed to avoid sending a piggyback response
setTimeout(function() {
res.end('42')
}, 200)
res.on('error', function() {

@@ -698,3 +722,9 @@ done()

server.on('request', function(req, res) {
// the first is the current status
// it's in piggyback on the ack
res.write('hello')
// the second status is on the observe
res.write('hello2')
res.on('finish', function() {

@@ -701,0 +731,0 @@ done()

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