Skip to content

Commit 33cd0c5

Browse files
chore(release): 4.2.0 [skip ci]
# [4.2.0](v4.1.0...v4.2.0) (2020-07-06) ### Features * Add setKeepAlive() method ([#62](#62)) ([35cea93](35cea93))
1 parent 35cea93 commit 33cd0c5

File tree

5 files changed

+22
-4
lines changed

5 files changed

+22
-4
lines changed

CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# [4.2.0](https://github.com/Rapsssito/react-native-tcp-socket/compare/v4.1.0...v4.2.0) (2020-07-06)
2+
3+
4+
### Features
5+
6+
* Add setKeepAlive() method ([#62](https://github.com/Rapsssito/react-native-tcp-socket/issues/62)) ([35cea93](https://github.com/Rapsssito/react-native-tcp-socket/commit/35cea93d53f9d9bad9e28cf1a1657b8722335010))
7+
18
# [4.1.0](https://github.com/Rapsssito/react-native-tcp-socket/compare/v4.0.0...v4.1.0) (2020-06-18)
29

310

coverage/coverage-final.json

+1-1
Large diffs are not rendered by default.

lib/types/TcpServer.d.ts

+2
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ export default class TcpServer extends TcpSocket {
4242
tlsCert?: any;
4343
}, callback?: ((address: string) => void) | undefined): TcpServer;
4444
setTimeout(timeout: number, callback?: (() => void) | undefined): TcpServer;
45+
setNoDelay(noDelay?: boolean): TcpServer;
46+
setKeepAlive(enable?: boolean, initialDelay?: number): TcpServer;
4547
addListener(event: string | symbol, listener: (...args: any[]) => void): TcpServer;
4648
on(event: string | symbol, listener: (...args: any[]) => void): TcpServer;
4749
once(event: string | symbol, listener: (...args: any[]) => void): TcpServer;

lib/types/TcpSocket.d.ts

+11-2
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,18 @@ export default class TcpSocket extends EventEmitter {
8787
*
8888
* Passing `true` for `noDelay` or not passing an argument will disable Nagle's algorithm for the socket. Passing false for noDelay will enable Nagle's algorithm.
8989
*
90-
* @param {boolean} noDelay
90+
* @param {boolean} noDelay Default: `true`
9191
*/
92-
setNoDelay(noDelay?: boolean): void;
92+
setNoDelay(noDelay?: boolean): TcpSocket;
93+
/**
94+
* Enable/disable keep-alive functionality, and optionally set the initial delay before the first keepalive probe is sent on an idle socket.
95+
*
96+
* `initialDelay` is ignored.
97+
*
98+
* @param {boolean} enable Default: `false`
99+
* @param {number} initialDelay ***IGNORED**. Default: `0`
100+
*/
101+
setKeepAlive(enable?: boolean, initialDelay?: number): TcpSocket;
93102
address(): string | undefined;
94103
/**
95104
* @param {string | Buffer | Uint8Array} data

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "react-native-tcp-socket",
33
"title": "React Native Tcp Socket",
4-
"version": "4.1.0",
4+
"version": "4.2.0",
55
"description": "React Native TCP socket API for Android & iOS with SSL/TLS support",
66
"main": "src/index.js",
77
"types": "lib/types/index.d.ts",

0 commit comments

Comments
 (0)