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

nodejs-websocket

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nodejs-websocket - npm Package Compare versions

Comparing version 1.5.0 to 1.6.0

3

HISTORY.md

@@ -0,1 +1,4 @@

# 1.6.0
* Added: `Server#close` as a short hand for `Server#socket.close`
# 1.5.0

@@ -2,0 +5,0 @@ * Added: `Connection#send` as a short hand for `Connection#sendText` or `Connection#sendBinary`, depending on the data type (string or Buffer)

6

package.json
{
"name": "nodejs-websocket",
"version": "1.5.0",
"version": "1.6.0",
"author": "Sitegui <sitegui@sitegui.com.br>",

@@ -24,5 +24,5 @@ "description": "Basic server&client approach to websocket (text and binary frames)",

"devDependencies": {
"mocha": "^2.3.4",
"should": "^8.1.0"
"mocha": "^2.4.5",
"should": "^8.3.1"
}
}

@@ -70,2 +70,5 @@ # Nodejs Websocket

## server.close([callback])
Stops the server from accepting new connections and keeps existing connections. This function is asynchronous, the server is finally closed when all connections are ended and the server emits a 'close' event. The optional callback will be called once the 'close' event occurs.
## server.socket

@@ -72,0 +75,0 @@ The underlying socket, returned by net.createServer or tls.createServer

@@ -100,2 +100,15 @@ /**

return this
}
/**
* Stops the server from accepting new connections and keeps existing connections.
* This function is asynchronous, the server is finally closed when all connections are ended and the server emits a 'close' event.
* The optional callback will be called once the 'close' event occurs.
* @param {function()} [callback]
*/
Server.prototype.close = function (callback) {
if (callback) {
this.once('close', callback)
}
this.socket.close()
}
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