
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
monitor-ws-client
Advanced tools
Install with npm:
npm install --save monitor-ws-client
###本SDK 遵守UMD规范,兼容CommonJs、CMD、AMD导入 Babel
import monitorWsClient from "monitor-ws-client";
CommonJs
const monitorWsClient=require( "monitor-ws-client" );
Amd
define( [ "monitor-ws-client" ], function( monitorWsClient) {
} );
Browser
<script src="./monitor-ws-client.min.js"></script>
<script type="text/javascript">
var webSocketObj = new monitorWsClient({ 'token': 'f062742310ab27eb6915a2a47e6a235cfaadd29f'});
//建立连接(deptIds,多个部门之间逗号分隔),销毁之前连接
//客户端主动关闭当前连接
//webSocketObj.close();
//建立连接监听
webSocketObj.on('open', function(data) {
console.log('WebSocket is open now.');
});
//连接关闭监听
webSocketObj.on('close', function(data) {
console.log('WebSocket is close now');
});
//初始化消息传输监听,用于初始化界面
webSocketObj.on('init', function(data) {
//获取数据处理逻辑,其中数据格式如下
console.log('init Message from server ', data);
});
//消息传输监听,用于更新数据
webSocketObj.on('message', function(data) {
//获取数据处理逻辑,其中数据格式如下
console.log('Message from server ', data);
});
//重连监听
webSocketObj.on('reconnect', function(data) {
console.log('WebSocket is reconnect ');
});
//连接异常监听
webSocketObj.on('error', function(data) {
console.log('WebSocket is error.');
});
webSocketObj.connect({ deptIds: 'id11,id22' });
</script>
###推送数据格式如下
{
"timeStamp": 1605593550,
"code": 0,
"message": "success",
"data": {
"agList": {
"init": false,
"data": [
{
"agId": "313191",
"agName": "1773 刘隽廷",
"agReasonTime": 1605593550,
"agSta": 3,
"agStaReason": 0,
"agStaReasonStr": "置闲",
"agStaStr": "置闲",
"agStaTime": 1605593550,
"totalCallOutPostPTime": 228,
"totalStatusTimes_5": 228
},
{
"agId": "334855",
"agName": "2076 周春花",
"agReasonTime": 1605593549,
"agSta": 10,
"agStaReason": 0,
"agStaReasonStr": "外呼振铃",
"agStaStr": "外呼振铃",
"agStaTime": 1605593549,
"callMtype": 2,
"callQue": "",
"callQueName": "",
"callType": "2_1",
"callTypeDetail": 4121,
"incomingCallNum": "18858241394",
"preCallType": 2,
"totalCallOutEnterNum": 57,
"totalStatusNum_10": 62
},
{
"agId": "322585",
"agName": "1925 刘玉玉",
"callMtype": 2,
"callQue": "",
"callQueName": "",
"callType": "2_1",
"incomingCallNum": "13503468602",
"totalCallOutEnterNum": 91
}
]
}
}
}
####如您需要查看具体文档获取更多信息请点击以下链接 参考api文档
FAQs
webSocket utils
We found that monitor-ws-client demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.