client/tcpclient.js
function(e){
			if(closed[e.syncId]){
				return
			}
			//console.log('tcpclient got response ready(' + e.syncId + ')')//: ' + JSON.stringify(e))
			var cb = syncReadyCallbacks[e.requestId];
			delete syncReadyCallbacks[e.requestId]
			_.assertFunction(cb);
			cb(undefined, e);
		}
function(e){
			if(closed[e.syncId]){
				return
			}
			//console.log('tcpclient got response ready(' + e.syncId + ')')//: ' + JSON.stringify(e))
			var cb = syncReadyCallbacks[e.requestId];
			delete syncReadyCallbacks[e.requestId]
			_.assertFunction(cb);
			cb(undefined, e);
		}
function ( e ) { if ( closed [ e . syncId ] ) { return } //console.log('tcpclient got response ready(' + e.syncId + ')')//: ' + JSON.stringify(e)) var cb = syncReadyCallbacks [ e . requestId ] ; delete syncReadyCallbacks [ e . requestId ] _ . assertFunction ( cb ) ; cb ( undefined , e ) ; }
/*update: function(e){
if(closed[e.destinationSyncId]){
return
}

_.assertInt(e.destinationSyncId)
var cb = syncListenersBySyncId[e.destinationSyncId]
_.assertFunction(cb.edit);
_.assertFunction(cb.object);

updateReader.put(e.edit)
e.edit = fp.readersByCode[e.op](updateReader.s)

_.assertInt(e.editId)
console.log('tcpclient got response update: ' + e.op + ' ' + JSON.stringify(e.edit) + ' ' + e.editId + ' '  + e.destinationSyncId)

w.syncIdUpTo({editId: e.editId, syncId: e.destinationSyncId})

cb.edit(e);
},
updateObject: function(e){
if(closed[e.destinationSyncId]){
return
}

_.assertInt(e.destinationSyncId)
var cb = syncListenersBySyncId[e.destinationSyncId]
_.assertObject(cb)
var r = fparse.makeSingleReader(e.edits)
var many = r.readInt()
var edits = []
console.log('many: ' + many)
for(var i=0;i<many;++i){
var op = r.readByte()
var editId = r.readInt()
var edit = fp.readersByCode[op](r)
edits.push({op: op, edit: edit, editId: editId})
}
log([e.id, edits])
cb.object(e.id, edits)
},
updateViewObject: function(e){
if(closed[e.destinationSyncId]){
return
}

_.assertInt(e.destinationSyncId)
console.log('got view object update: ' + JSON.stringify(e))
console.log('destination: ' + e.destinationSyncId)
var cb = syncListenersBySyncId[e.destinationSyncId]
_.assertObject(cb)
var r = fparse.makeSingleReader(e.edits)
var many = r.readInt()
var edits = []
console.log('many: ' + many)
for(var i=0;i<many;++i){
var op = r.readByte()
var editId = r.readInt()
var edit = fp.readersByCode[op](r)
edits.push({op: op, edit: edit, editId: editId})
}
log([e.id, edits])
cb.object(e.id, edits)
},
/ * update : function ( e ) { if ( closed [ e . destinationSyncId ] ) { return }