Skip to content

Instantly share code, notes, and snippets.

@ggoodman
Created April 1, 2011 15:43
Show Gist options
  • Save ggoodman/898366 to your computer and use it in GitHub Desktop.
Save ggoodman/898366 to your computer and use it in GitHub Desktop.
async = new Async
async
.local
client: (msg) ->
console.log "CLIENT", msg
addTen: (n, cb) ->
cb(n + 10)
.remote('server', "Hello from the client")
async
.local
server: (msg) ->
console.log "", msg
.remote('client', "Hello from the server")
.init(app)
.remote 'addTen', 10, (msg) ->
console.log "Received from the browser", msg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment