Created
April 1, 2011 15:43
-
-
Save ggoodman/898366 to your computer and use it in GitHub Desktop.
This file contains 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
async = new Async | |
async | |
.local | |
client: (msg) -> | |
console.log "CLIENT", msg | |
addTen: (n, cb) -> | |
cb(n + 10) | |
.remote('server', "Hello from the client") |
This file contains 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
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