Socket
Socket
Sign inDemoInstall

tcp-base

Package Overview
Dependencies
9
Maintainers
4
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.1.0 to 3.1.1

9

History.md
3.1.1 / 2022-09-01
==================
**fixes**
* [[`be4eee2`](http://github.com/node-modules/tcp-base/commit/be4eee2c8bc3f96b6de11639c5e346a08e92fdf0)] - fix: socket.on('error') instead of once (#13) (hyj1991 <<yeekwanvong@gmail.com>>)
**others**
* [[`d0a814a`](http://github.com/node-modules/tcp-base/commit/d0a814a17da2d5dc910e3eee3706646972d9396c)] - 🤖 TEST: Run ci on GitHub Action (#14) (fengmk2 <<fengmk2@gmail.com>>)
3.1.0 / 2017-12-01

@@ -3,0 +12,0 @@ ==================

8

lib/base.js

@@ -34,3 +34,3 @@ 'use strict';

* - {Logger} [logger] - the logger client
* @constructor
* @class
*/

@@ -223,2 +223,6 @@ constructor(options) {

timer: setTimeout(() => {
if (!this._socket) {
return;
}
meta.bufferSize2 = this._socket.bufferSize;

@@ -396,3 +400,3 @@ meta.endTime = endTime;

socket.once('close', () => { this._handleClose(); });
socket.once('error', err => {
socket.on('error', err => {
err.message += ' (address: ' + this[addressKey] + ')';

@@ -399,0 +403,0 @@ this._lastError = err;

{
"name": "tcp-base",
"version": "3.1.0",
"version": "3.1.1",
"description": "A base class for tcp client with basic functions",

@@ -10,3 +10,2 @@ "main": "lib/base.js",

"scripts": {
"autod": "autod",
"lint": "eslint --ext .js .",

@@ -36,14 +35,13 @@ "test": "npm run lint && npm run test-local",

"ci": {
"version": "6, 7"
"version": "14, 16, 18",
"os": "linux"
},
"devDependencies": {
"autod": "^2.8.0",
"contributors": "^0.5.1",
"egg-bin": "^3.3.0",
"egg-ci": "^1.6.0",
"eslint": "^3.19.0",
"eslint-config-egg": "^3.2.0",
"egg-bin": "^5.2.0",
"egg-ci": "^2.1.0",
"eslint": "^8.23.0",
"eslint-config-egg": "^12.0.0",
"mm": "^2.1.0",
"mz-modules": "^1.0.0",
"npminstall": "^2.29.1",
"pedding": "^1.1.0"

@@ -50,0 +48,0 @@ },

# tcp-base
A base class for tcp client with basic functions
[![NPM version][npm-image]][npm-url]
[![build status][travis-image]][travis-url]
[![Node.js CI](https://github.com/node-modules/tcp-base/actions/workflows/nodejs.yml/badge.svg)](https://github.com/node-modules/tcp-base/actions/workflows/nodejs.yml)
[![Test coverage][codecov-image]][codecov-url]
[![David deps][david-image]][david-url]
[![Known Vulnerabilities][snyk-image]][snyk-url]
[![npm download][download-image]][download-url]

@@ -13,10 +12,4 @@

[npm-url]: https://npmjs.org/package/tcp-base
[travis-image]: https://img.shields.io/travis/node-modules/tcp-base.svg?style=flat-square
[travis-url]: https://travis-ci.org/node-modules/tcp-base
[codecov-image]: https://codecov.io/gh/node-modules/tcp-base/branch/master/graph/badge.svg
[codecov-url]: https://codecov.io/gh/node-modules/tcp-base
[david-image]: https://img.shields.io/david/node-modules/tcp-base.svg?style=flat-square
[david-url]: https://david-dm.org/node-modules/tcp-base
[snyk-image]: https://snyk.io/test/npm/tcp-base/badge.svg?style=flat-square
[snyk-url]: https://snyk.io/test/npm/tcp-base
[download-image]: https://img.shields.io/npm/dm/tcp-base.svg?style=flat-square

@@ -28,3 +21,3 @@ [download-url]: https://npmjs.org/package/tcp-base

```bash
$ npm install tcp-base --save
npm install tcp-base --save
```

@@ -34,3 +27,3 @@

## Usage
## Usage

@@ -40,2 +33,3 @@ A quick guide to implement a tcp echo client

Client:
```js

@@ -99,2 +93,3 @@ 'use strict';

Server:
```js

@@ -146,2 +141,2 @@ 'use strict';

[MIT](LICENSE)
[MIT](LICENSE)
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc