Created
August 3, 2010 21:31
-
-
Save jfhbrook/507188 to your computer and use it in GitHub Desktop.
The basic DNode example in coffee-script.
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
#!/usr/bin/env coffee | |
# This one makes the call. | |
DNode: require 'dnode' | |
sys: require 'sys' | |
DNode.connect(6060, (remote) -> | |
remote.timesTen(5, (res) -> | |
sys.puts res ) | |
) |
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
#!/usr/bin/env coffee | |
# This one is the remote which answers the rmi. | |
DNode: require 'dnode' | |
sys: require 'sys' | |
DNode({timesTen: (n,f) -> f(n*10)}).listen(6060) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment