Join our webinar on Wednesday, June 26, at 1pm EDTHow Chia Mitigates Risk in the Crypto Industry.Register
Socket
Socket
Sign inDemoInstall

loadtest

Package Overview
Dependencies
26
Maintainers
1
Versions
122
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.2 to 2.0.3

40

lib/testserver.js

@@ -83,25 +83,25 @@ 'use strict';

});
wsServer.on('request', function(request) {
wsServer.on('request', function(request)
{
// explicity omitting origin check here.
var connection = request.accept(null, request.origin);
log.debug(' Connection accepted.');
connection.on('message', function(message)
{
if (message.type === 'utf8')
var connection = request.accept(null, request.origin);
log.debug(' Connection accepted.');
connection.on('message', function(message)
{
log.debug('Received Message: ' + message.utf8Data);
connection.sendUTF(message.utf8Data);
}
else if (message.type === 'binary')
if (message.type === 'utf8')
{
log.debug('Received Message: ' + message.utf8Data);
connection.sendUTF(message.utf8Data);
}
else if (message.type === 'binary')
{
log.debug('Received Binary Message of ' + message.binaryData.length + ' bytes');
connection.sendBytes(message.binaryData);
}
});
connection.on('close', function()
{
log.debug('Received Binary Message of ' + message.binaryData.length + ' bytes');
connection.sendBytes(message.binaryData);
}
log.info('Peer %s disconnected', connection.remoteAddress);
});
});
connection.on('close', function(reasonCode, description) {
console.log((new Date()) + ' Peer ' + connection.remoteAddress + ' disconnected.');
});
});
return server;

@@ -178,3 +178,3 @@ };

{
log.info('Headers for %s: %s', request.method, util.inspect(request.headers));
log.info('Headers for %s to %s: %s', request.method, request.url, util.inspect(request.headers));
if (request.body)

@@ -181,0 +181,0 @@ {

{
"name": "loadtest",
"version": "2.0.2",
"version": "2.0.3",
"description": "Run load tests for your web application. Mostly ab-compatible interface, with an option to force requests per second. Includes an API for automated load testing.",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/alexfernandez/loadtest",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc