Skip to content

Instantly share code, notes, and snippets.

@chrisdickinson
Created December 31, 2012 23:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chrisdickinson/4423864 to your computer and use it in GitHub Desktop.
Save chrisdickinson/4423864 to your computer and use it in GitHub Desktop.
api sketch for autonode/tab-stream + iframes
// webgl-editor.com:
var available = via()
available.on('host', function(stream) {
if(stream.domain !== 'webgl-game.com') {
return
}
var rpc = dnode(local_functions)
rpc.pipe(stream).pipe(rpc)
})
// webgl-game.com:
var available = via()
available.on('host', function(stream) {
if(stream.domain !== 'webgl-editor.com') {
return
}
var rpc = dnode(local_functions)
rpc.pipe(stream).pipe(rpc)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment