q-connection.js
function makeRemote(id) {
        var remotePromise = Q.makePromise({
            when: function () {
                return this;
            }
        }, function (op, args) {
            var localId = makeId();
            var response = makeLocal(localId);
            _debug("sending:", "R" + JSON.stringify(id), JSON.stringify(op), JSON.stringify(encode(args)));
            connection.put(JSON.stringify({
                "type": "send",
                "to": id,
                "from": localId,
                "op": op,
                "args": encode(args)
            }));
            return response;
        });
        remotes.set(r,id);
        return remotePromise;
    }
function makeRemote(id) {
        var remotePromise = Q.makePromise({
            when: function () {
                return this;
            }
        }, function (op, args) {
            var localId = makeId();
            var response = makeLocal(localId);
            _debug("sending:", "R" + JSON.stringify(id), JSON.stringify(op), JSON.stringify(encode(args)));
            connection.put(JSON.stringify({
                "type": "send",
                "to": id,
                "from": localId,
                "op": op,
                "args": encode(args)
            }));
            return response;
        });
        remotes.set(r,id);
        return remotePromise;
    }
function makeRemote ( id ) { var remotePromise = Q . makePromise ( { when : function ( ) { return this ; } } , function ( op , args ) { var localId = makeId ( ) ; var response = makeLocal ( localId ) ; _debug ( "sending:" , "R" + JSON . stringify ( id ) , JSON . stringify ( op ) , JSON . stringify ( encode ( args ) ) ) ; connection . put ( JSON . stringify ( { "type" : "send" , "to" : id , "from" : localId , "op" : op , "args" : encode ( args ) } ) ) ; return response ; } ) ; remotes . set ( r , id ) ; return remotePromise ; }
makes a promise that will send all of its events to a remote object.
makes a promise that will send all of its events to a remote object .