feat: socket超时判断 为30秒。

This commit is contained in:
alwxkxk 2021-07-31 19:48:26 +08:00
parent 70b14d547a
commit 175e015a0b
2 changed files with 2 additions and 2 deletions

View File

@ -2,7 +2,7 @@
const net = require('net')
const PORT = "9002"
const equipmentArray = []
const TIMEOUT = 60*1000; // 60秒没接收到数据就断开连接
const TIMEOUT = 30*1000; // 30秒没接收到数据就断开连接
//创建服务器对象
const server = net.createServer((socket)=>{
//connect

View File

@ -2,7 +2,7 @@
const net = require('net')
const PORT = "9003"
const equipmentArray = []
const TIMEOUT = 60*1000; // 60秒没接收到数据就断开连接
const TIMEOUT = 30*1000; // 30秒没接收到数据就断开连接
const mongodb = require('./mongodb.js')
const websocket = require('./websocket.js')
const tcpClient = require('./tcp-client.js')