wallet @browser working again

This commit is contained in:
Matias Alejo Garcia 2014-04-15 12:52:28 -03:00
commit 4dcd18c42f
8 changed files with 54 additions and 52 deletions

View file

@ -220,6 +220,8 @@ Network.prototype.start = function(openCallback) {
Network.prototype._sendToOne = function(peerId, data, cb) {
if (peerId !== this.peerId) {
console.log('[WebRTC.js.222:peerId:]',peerId, data); //TODO
var conns = this.peer.connections[peerId];
if (conns) {
@ -240,10 +242,12 @@ Network.prototype._sendToOne = function(peerId, data, cb) {
Network.prototype.send = function(peerIds, data, cb) {
var self=this;
console.log('[WebRTC.js.242:peerIds:]',peerIds); //TODO
if (!peerIds) {
peerIds = this.connectedPeers;
data.isBroadcast = 1;
}
console.log('[WebRTC.js.246:peerIds:]',peerIds, data); //TODO
if (Array.isArray(peerIds)) {
var l = peerIds.length;