node-tcp-client
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

node-tcp-client

🚄 使用教程

安装

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

使用

import TCPClient from "node-tcp-client"

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

📖 文档

TCPClient

Kind: global class

new TCPClient(options)

TCP客户端

Param Type Description
options Object ip - 服务器ip port -服务器端口

tcpClient.setCallback(handle)

设置回调函数

Param Type Description
handle function 设置回调函数

tcpClient.send(data)

发送通信命令

Param Type Description
data Object 消息

tcpClient.open(options)

开启client

Param Type Description
options Object ip - 服务器ip port -服务器端口

Readme

Keywords

Package Sidebar

Install

npm i node-tcp-client

Weekly Downloads

0

Version

0.0.1

License

ISC

Unpacked Size

14.5 kB

Total Files

8

Last publish

Collaborators

  • xxmushi