bitcore-node-zcash/app/views/sockets/main.js

21 lines
367 B
JavaScript
Raw Normal View History

2014-01-13 13:13:41 -08:00
'use strict';
var Transaction = require('../../models/Transaction');
// server-side socket behaviour
2014-01-14 11:56:02 -08:00
var io = null;
module.exports.init = function(app, io_ext) {
io = io_ext;
2014-01-13 13:13:41 -08:00
io.set('log level', 1); // reduce logging
io.sockets.on('connection', function(socket) {
2014-01-13 13:13:41 -08:00
});
};
2014-01-14 11:56:02 -08:00
module.exports.broadcast_tx = function(tx) {
io.sockets.emit('tx', tx);
};