1.1.2 • Published 2 years ago

general-mqtt v1.1.2

Weekly downloads
5
License
MIT
Repository
github
Last release
2 years ago

general-mqtt

A general mqtt client that can be used in Wechat mini program, web, react native. It also encapsulates some common functions.

Usage

singleton

ConnectionManager.initConnectionOptions({
  debug: true,
  uri: '',
  clientId: '',
  env: 'web',
  userName: '',
  password: '',
  reconnect: true,
  timeout: 5,
  cleanSession: true,
  maxReconnectTimeInterval: 32,
})

const conn = await ConnectionManager.sharedInstance()

conn.subscribe('/test', (topic, msg) => console.log(topic, msg), {
  onSuccess() {
    conn.publish('/test', 'hello world')
  },
})
1.1.2

2 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.12

3 years ago

1.0.11

3 years ago

1.0.9

4 years ago

1.0.10

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago