Socket
Socket
Sign inDemoInstall

hdb

Package Overview
Dependencies
Maintainers
4
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hdb - npm Package Compare versions

Comparing version 0.18.2 to 0.18.3

13

lib/protocol/tcp.js

@@ -18,2 +18,3 @@ // Copyright 2013 SAP AG.

var tls = require('tls');
var defaultKeepAliveIdle = 200000; // milliseconds

@@ -36,3 +37,15 @@ exports.createSocket = net.connect;

socket.setNoDelay(true);
var keepAliveIdle = defaultKeepAliveIdle;
var enableKeepAlive = true;
if ('tcpKeepAliveIdle' in options) {
var val = options['tcpKeepAliveIdle'];
if (val === false) {
enableKeepAlive = false;
} else {
keepAliveIdle = val * 1000;
if (isNaN(keepAliveIdle)) keepAliveIdle = defaultKeepAliveIdle;
}
}
socket.setKeepAlive(enableKeepAlive, keepAliveIdle);
return socket;
};

2

package.json

@@ -9,3 +9,3 @@ {

"description": "SAP HANA Database Client for Node",
"version": "0.18.2",
"version": "0.18.3",
"repository": {

@@ -12,0 +12,0 @@ "type": "git",

@@ -26,2 +26,3 @@ hdb - Pure JavaScript SAP HANA Database Client

* [CESU-8 encoding support](#cesu-8-encoding-support)
* [TCP Keepalive](#tcp-keepalive)
* [Running tests](#running-tests)

@@ -73,4 +74,4 @@ * [Running examples](#running-examples)

| Pure JavaScript package |:x: |:heavy_check_mark:|
| Node.js major version support |8, 10, 12|All Supported Versions|
| License (without alternate SAP license agreement) |[SAP Developer Agreement](tools.hana.ondemand.com/developer-license.txt)|[Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0.html)|
| Node.js major version support |8+|All Supported Versions|
| License (without alternate SAP license agreement) |[SAP Developer Agreement](https://tools.hana.ondemand.com/developer-license.txt)|[Apache 2.0](http://www.apache.org/licenses/LICENSE-2.0.html)|
| SAP Support (with SAP Support agreement) |Component [HAN-DB-CLI](https://launchpad.support.sap.com/#incident/create)|Component [HAN-DB-CLI](https://launchpad.support.sap.com/#incident/create)|

@@ -591,2 +592,34 @@ | Community Support |[answers.sap.com](https://answers.sap.com/tags/73554900100700000996) HANA tag|[node-hdb/issues](https://github.com/SAP/node-hdb/issues)

TCP Keepalive
-------------
To configure TCP keepalive behaviour, include the tcpKeepAliveIdle connect option. The value provided for this option is the number of seconds before an idle connection will begin sending keepalive packets. By default, TCP keepalive will be turned on with a value of 200 seconds. If a value of 0 is specified, keepalive behaviour is determined by the operating system.
The following example creates a client whose connections will begin sending keepalive packets after 300 seconds.
```js
var hdb = require('hdb');
var client = hdb.createClient({
host : 'hostname',
port : 30015,
user : 'user',
password : 'secret',
tcpKeepAliveIdle : 300
});
```
TCP keepalive can be explicity disabled by specifying tcpKeepAliveIdle=false as in the example below.
```js
var hdb = require('hdb');
var client = hdb.createClient({
host : 'hostname',
port : 30015,
user : 'user',
password : 'secret',
tcpKeepAliveIdle : false
});
```
Running tests

@@ -593,0 +626,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