I have managed to broadcast messages using a global variable inside of the default js like this:
______________________________________________________________________________________________
exports.install = function(framework) {
framework.route('/', index);
framework.route('/route2',route_callback);
framework.websocket('/', socket_callback, ['json']);
};
var global_socket;
function socket_callback(){
global_socket = this;
};
function route_callback(){
global_socket.send({type: 'msg' , message: 'ALLO'});
}
______________________________________________________________________________________________
But is there any native way to do this?