ob-message-server
v1.0.8
Published
<p align="center"> <a href="https://getbootstrap.com/"> <img src="https://getbootstrap.com/docs/5.1/assets/brand/bootstrap-logo-shadow.png" alt="Bootstrap logo" width="200" height="165"> </a> </p>
Downloads
3
Readme
大纲
源码包发布流程
使用说明
主要的类
BroadcastServer
MessageServer
API说明
示例
NodeJS 服务端
import { BroadcastServer } from "./BroadcastServer.js"
import { Logger } from "./Logger.js"
import { MessageServer, MessageChannel } from "./MessageServer.js"
const broadcastServer = new BroadcastServer()
broadcastServer.start()
const messageServer = new MessageServer()
messageServer.registChannelCallback(MessageChannel.ON_LINE, guid => {
Logger.w('[ TEST ] ON_LINE : GUID = ' + guid)
})
messageServer.registChannelCallback(MessageChannel.OFF_LINE, (ip, guid) => {
Logger.w('[ TEST ] OFF_LINE : IP = ' + ip + ' GUID = ' + guid)
})
messageServer.start()
C++ 客户端
截图