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

limitd-client

Package Overview
Dependencies
Maintainers
1
Versions
70
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

limitd-client - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

2

package.json
{
"name": "limitd-client",
"version": "1.0.2",
"version": "1.0.3",
"description": "limitd client for node.js",

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

@@ -9,4 +9,2 @@ var net = require('net');

var protocol = require('../lib/protocol');
var decoder = pbStream.decoder(protocol.Request);
var encoder = pbStream.encoder(protocol.Response);

@@ -19,2 +17,5 @@ function MockServer (options) {

var decoder = pbStream.decoder(protocol.Request);
var encoder = pbStream.encoder(protocol.Response);
this._server = net.createServer(function (socket) {

@@ -21,0 +22,0 @@ self._sockets.push(socket);

@@ -30,3 +30,2 @@ var LimitdClient = require('../');

it('should work', function (done) {

@@ -40,28 +39,16 @@ var server = new MockServer();

setTimeout(function () {
//turn of the mockserver
server.close();
}, 100);
server.close();
setTimeout(function () {
//start a new one and wait reconnection
server = new MockServer();
server = new MockServer();
server.on('request', mock_response)
.listen(function () {
client.once('ready', function () {
client.take('ip', '191.12.23.32', 1, done);
}, 1000);
server.on('request', mock_response)
.listen(function () {
client.once('ready', function () {
client.take('ip', '191.12.23.32', 1, done);
});
}, 1000);
});
});
});
});
});
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