Created
January 10, 2014 20:32
-
-
Save kumavis/8362028 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// -- -- -- -- on one machine -- -- -- -- -- | |
var syncedObjectStore = new SyncedObjectStore(duplexStream) | |
var objA = new syncedObjectStore.Object() | |
var objB = new syncedObjectStore.Object() | |
var objC = new syncedObjectStore.Object() | |
objA.b = objB | |
objB.c = objC | |
// -- -- -- -- on the other machine -- -- -- -- | |
var syncedObjectStore = new SyncedObjectStore(duplexStream) | |
// later we have a reference to these objects created remotely and | |
// we can see their references have been kept | |
atSomePointLater(function(objA,objB,objC){ | |
objB.c === objC //=> true | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment