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
7
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 1.18.0 to 1.19.0

1

docs/API.md

@@ -85,2 +85,3 @@ # Documentation

* closeTimeout : end the connection after this delay in milliseconds if server doesn't answer to ping, default to `120*1000`
* noPongTimeout : after the server opened the connection, wait for a default of `5*1000` after pinging and answers without the latency
* checkTimeoutInterval : default to `30*1000` (30s), check if keepalive received at that period, disconnect otherwise.

@@ -87,0 +88,0 @@ * version : 1.8 or 1.9 or false (to auto-negotiate): default to 1.8

# History
## 1.19.0
* make auto version more robust by giving up after 5s if no answer to ping is given but the version is returned
## 1.18.0

@@ -4,0 +8,0 @@

2

package-lock.json
{
"name": "minecraft-protocol",
"version": "1.18.0",
"version": "1.19.0",
"lockfileVersion": 1,

@@ -5,0 +5,0 @@ "requires": true,

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

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

@@ -18,3 +18,4 @@ 'use strict'

var closeTimer = null
options.closeTimeout = 120 * 1000
options.closeTimeout = options.closeTimeout || 120 * 1000
options.noPongTimeout = options.noPongTimeout || 5 * 1000

@@ -30,4 +31,10 @@ const client = new Client(false, version.minecraftVersion)

const start = Date.now()
const maxTime = setTimeout(() => {
clearTimeout(closeTimer)
cb(null, data)
client.end()
}, options.noPongTimeout)
client.once('ping', function (packet) {
data.latency = Date.now() - start
clearTimeout(maxTime)
clearTimeout(closeTimer)

@@ -34,0 +41,0 @@ cb(null, data)

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