mirror of
https://github.com/alibaba/anyproxy.git
synced 2025-08-04 21:39:04 +00:00
update changelog, do some tiny adjustment
This commit is contained in:
@@ -47,7 +47,8 @@ function resToMsg(msg,cb){
|
||||
//config.port
|
||||
function wsServer(config){
|
||||
//web socket interface
|
||||
var wss = new WebSocketServer({port: config.port});
|
||||
var self = this,
|
||||
wss = new WebSocketServer({port: config.port});
|
||||
wss.broadcast = function(data) {
|
||||
var key = data.id;
|
||||
if(typeof data == "object"){
|
||||
@@ -86,9 +87,12 @@ function wsServer(config){
|
||||
}
|
||||
});
|
||||
|
||||
//Iconv-lite warning: decode()-ing strings is deprecated. Refer to https://github.com/ashtuchkin/iconv-lite/wiki/Use-Buffers-when-decoding
|
||||
|
||||
return wss;
|
||||
self.wss = wss;
|
||||
}
|
||||
|
||||
wsServer.prototype.closeAll = function(){
|
||||
var self = this;
|
||||
self.wss.close();
|
||||
}
|
||||
|
||||
module.exports = wsServer;
|
||||
Reference in New Issue
Block a user