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

minecraft-protocol

Package Overview
Dependencies
Maintainers
2
Versions
176
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

minecraft-protocol - npm Package Compare versions

Comparing version 0.7.2 to 0.7.3

29

lib/client.js

@@ -25,5 +25,2 @@ var net = require('net')

var incomingBuffer = new Buffer(0);
self.socket.setNoDelay();
self.socket.on('data', function(data) {

@@ -48,13 +45,23 @@ if (self.encryptionEnabled) data = new Buffer(self.decipher.update(data), 'binary');

self.socket.on('error', function(err) {
self.emit('error', err);
self.socket.on('connect', function() {
self.emit('connect');
});
self.socket.on('close', function() {
self.socket.on('error', onError);
self.socket.on('close', endSocket);
self.socket.on('end', endSocket);
self.socket.on('timeout', endSocket);
function onError(err) {
self.emit('error', err);
endSocket();
}
function endSocket() {
self.socket.removeListener('error', onError);
self.socket.removeListener('close', endSocket);
self.socket.removeListener('end', endSocket);
self.socket.removeListener('timeout', endSocket);
self.emit('end', self._endReason);
});
self.socket.on('connect', function() {
self.emit('connect');
});
}
};

@@ -61,0 +68,0 @@

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

self.socketServer.on('connection', function(socket) {
socket.setNoDelay();
var client = new Client(true);

@@ -30,0 +28,0 @@ client._end = client.end;

{
"name": "minecraft-protocol",
"version": "0.7.2",
"version": "0.7.3",
"description": "Parse and serialize minecraft packets, plus authentication and encryption.",

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

@@ -234,2 +234,8 @@ # minecraft protocol

### 0.7.3
* revert removing socket delays to reduce latency as it was causing
errors and test failures.
* server: Client now emits more predictable 'end' events.
### 0.7.2

@@ -236,0 +242,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