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

nodexchange

Package Overview
Dependencies
Maintainers
3
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nodexchange - npm Package Compare versions

Comparing version 1.5.0 to 1.6.0

2

package.json
{
"name": "nodexchange",
"version": "1.5.0",
"version": "1.6.0",
"description": "node library for scaling and load balancing servers",

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

@@ -19,10 +19,10 @@ # Installation

* Least-connections / round-robin load-balancing algorithm for http(s) and web sockets
* Least-connections / round-robin load-balancing algorithm for http/https and web sockets
### 3. Additional Features :
* Error logging
* IP throttling
* Direct compability with Redis for session storage

@@ -81,3 +81,3 @@

lb.deploy has five specific strings that can be used in this library.
lb.deploy has six specific strings that can be used in this library.

@@ -134,3 +134,3 @@ *****To see the other use cases and strings for lb.deploy in this library, click these links:*****

## rp.init ( req , res, boolean, number[optional], number[optional] ) —
## rp.init ( req , res, boolean[optional], number[optional], number[optional] ) —

@@ -210,2 +210,16 @@ **This method sends/ends the response to the client**

```
## rp.getCache ( ) -
Returns an object of what is currently cached.
## rp.setAlgoLC ( ) -
Sets the load-balancing algorithm to least-connections. This is the default
algorithm in NodeXchange.
## rp.setAlgoRR ( ) —
Sets the load-balancing algorithm to round-robin.
# Websockets Setup

@@ -217,3 +231,3 @@

**First parameter (string):** is a configuration argument for the load-balance library which in this case must be: ’wspool’ to initialize websocket proxying for the pooling option or 'ws' for the non-pooling option
**First parameter (string):** is a configuration argument for the load-balance library which in this case must be: ’wspool’ to initialize websocket proxying for the pooling option or 'ws' for the non-pooling option

@@ -226,3 +240,3 @@ ### Example:

## ws.init ( server, options, boolean[optional] ) —
This method commences websocket routing.
This method commences websocket routing.

@@ -243,3 +257,3 @@ **server (previously instantiated http(s) server object)**

**IMPORTANT NOTE ON POOLING FEATURE**
All web socket messages from client will be dropped until message is received with socketPoolId. Format of message must be "{'socketPoolId': 5}" where '5' is the pool id in this case (ie unique id for chatroom or lobby etc). Upon recieving this message, the web socket tunnel will be connected with the appropriate target server and messages will routed accordingly.
All web socket messages from client will be dropped until message is received with socketPoolId. Format of message must be "{'socketPoolId': 5}" where '5' is the pool id in this case (ie unique id for chatroom or lobby etc). Upon receiving this message, the web socket tunnel will be connected with the appropriate target server and messages will routed accordingly.

@@ -370,2 +384,1 @@ ### Example:

```
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