husq
2023-09-27 2c2bc8614c8ea0ce386369eb4924da1e6aa052d1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import {
  IClientOptions,
} from 'mqtt'
 
export const OPTIONS: IClientOptions = {
  clean: true, // true: 清除会话, false: 保留会话
  connectTimeout: 10000, // mqtt 超时时间
  resubscribe: true, // 断开重连后,再次订阅原订阅
  reconnectPeriod: 10000, // 重连间隔时间: 5s
  keepalive: 5, // 心跳间隔时间:1s
  clientId: 'DroneWeb',
  username: 'root',
  password: 'root',
  host: '182.106.212.58',
  protocol: 'ws',
  port: 35675,
}