# node-tcp-client

> tcp client for node

Latest version **0.0.1** (published 2021-07-27) · ISC license · 0 weekly downloads

## Install

```sh
npm install node-tcp-client
pnpm add node-tcp-client
yarn add node-tcp-client
bun add node-tcp-client
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2021-07-27 |
| First published | 2021-07-27 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 14.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | 国仪量子（合肥）技术有限公司（xx@ciqtek.com） |
| Maintainers | xxmushi |
| Keywords | node, tcp |

## Links

- npm: https://www.npmjs.com/package/node-tcp-client
- Repository: https://github.com/ciqtek/node-tcp-client
- Homepage: https://github.com/ciqtek/node-tcp-client#readme
- Issues: https://github.com/ciqtek/node-tcp-client/issues
- npm.io page: https://npm.io/package/node-tcp-client

## Alternatives

- [@expo/fingerprint](https://npm.io/package/@expo/fingerprint.md) — 6.2M weekly downloads
- [@azure/monitor-opentelemetry-exporter](https://npm.io/package/@azure/monitor-opentelemetry-exporter.md) — 850.0K weekly downloads
- [@azure/monitor-opentelemetry](https://npm.io/package/@azure/monitor-opentelemetry.md) — 624.0K weekly downloads
- [@posthog/ai](https://npm.io/package/@posthog/ai.md) — 423.3K weekly downloads
- [fakefilter](https://npm.io/package/fakefilter.md) — 63.9K weekly downloads

## Recent versions

- 0.0.1 (latest) — 2021-07-27

## README

# node-tcp-client


## 🚄 使用教程

### 安装

```bash
  npm i install node-tcp-client --save-dev or yarn add node-tcp-client --save-dev
```

### 使用

```js
import TCPClient from "node-tcp-client"

let tcpClient = new TCPClient({ip,port})

```

### 📖 文档

<a name="TCPClient"></a>

## TCPClient
**Kind**: global class  

- [node-tcp-client](#node-tcp-client)
  - [🚄 使用教程](#-使用教程)
    - [安装](#安装)
    - [使用](#使用)
    - [📖 文档](#-文档)
  - [TCPClient](#tcpclient)
    - [new TCPClient(options)](#new-tcpclientoptions)
    - [tcpClient.setCallback(handle)](#tcpclientsetcallbackhandle)
    - [tcpClient.send(data)](#tcpclientsenddata)
    - [tcpClient.open(options)](#tcpclientopenoptions)

<a name="new_TCPClient_new"></a>

### new TCPClient(options)
TCP客户端


| Param | Type | Description |
| --- | --- | --- |
| options | <code>Object</code> | ip - 服务器ip port -服务器端口 |

<a name="TCPClient+setCallback"></a>

### tcpClient.setCallback(handle)
设置回调函数


| Param | Type | Description |
| --- | --- | --- |
| handle | <code>function</code> | 设置回调函数 |

<a name="TCPClient+send"></a>


### tcpClient.send(data)
发送通信命令


| Param | Type | Description |
| --- | --- | --- |
| data | <code>Object</code> | 消息 |

<a name="TCPClient+open"></a>


### tcpClient.open(options)
开启client


| Param | Type | Description |
| --- | --- | --- |
| options | <code>Object</code> | ip - 服务器ip port -服务器端口 |

---
_Source: https://npm.io/package/node-tcp-client · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
