bigbluebutton-Github/labs/bbb-webrtc-sfu/lib/video/websocket.js
2017-11-11 01:44:50 +00:00

18 lines
319 B
JavaScript

/*
* Simple wrapper around the ws library
*
*/
var ws = require('ws');
ws.prototype.sendMessage = function(json) {
return this.send(JSON.stringify(json), function(error) {
if(error)
console.log(' [server] Websocket error "' + error + '" on message "' + json.id + '"');
});
};
module.exports = ws;