【文件属性】:
文件名称:net-socket-connect:给定远程端口主机,设置一个低级net.Socket。 与回调和连接超时!
文件大小:4KB
文件格式:ZIP
更新时间:2021-03-17 16:31:22
JavaScript
网络套接字连接
给定远程端口/主机,设置一个低级net.Socket。 与回调和连接超时!
npm安装
npm install --save @js-util/net-socket-connect
用法示例
PS:这是不完整的代码,您将需要针对您的实际用例进行修改。
// Load the module
const netSocketTimeout = require ( "@js-util/net-socket-connect);
// Create the server with the socket listening event
let remotesocket = netSocketTimeout(80, " 127.0 .0 .1 " , ( socket , err ) => {
if ( err ) {
console . error ( err ) ;
r
【文件预览】:
net-socket-connect-master
----netSocketConnect.js(2KB)
----.npmignore(194B)
----LICENSE(1KB)
----README.md(636B)
----.gitignore(129B)
----package.json(565B)