@pluve/magic-hardware-interact-sdk
v0.0.9
Published
hardware, websocket, sdk
Downloads
15
Maintainers
Keywords
Readme
magic-hardware-interact-sdk
Usage
import { HardwareInteractSDK } from '@pluve/magic-hardware-interact-sdk';
HardwareInteractSDK.getInstance()
.init({
wsUrl: 'ws://localhost',
ports: [1024],
// protocols: '',
heartbeatInterval: 5000,
reconnectDelay: 5000,
storeCode: '5024',
memberCode: '00121468',
callback: function(e) {
console.log('接收到的数据: ', e);
},
})
.send({
businessType: '',
action: 'echo',
businessData: 'hello',
});