Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

dms-client-library

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dms-client-library

dms client using for dms system

latest
npmnpm
Version
1.2.0
Version published
Maintainers
1
Created
Source

DMS-Client-Library

DMS System을 이용할 클라이언트를 만들기 위한 Node.js API입니다.

Install


npm install dms-client-library

사용법

var dmsclient = require('dms-client-library');
var dms = new dmsclient(address);
모듈 require 후 객체생성후 사용
address : DMS system이 실행되고있는 메인 서버의 IP:port

connect(callback)


클라이언트가 적절한 브로커에 연결됨
callback : function(ip){}
ip : 적절한 브로커 ip를 담고있는 객체

publish(topic, payload, callback)


클라이언트가 message를 publish 함
topic : 보내려는 message의 토픽
payload : message payload
※ mqtt프로토콜 참고

subscribe(topic, callback)


클라이언트가 message를 수신함
topic : 수신할 message topic

packetArrived(doing, callback)


메시지가 수신될 시 실행되는 함수
doing : function(topic,payload){}
메시지가 수신될시 수행 할 함수 (사용자 정의)

disconnet(callback)


연결 해제

Keywords

mqtt

FAQs

Package last updated on 09 Apr 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts