Created
July 24, 2013 06:33
-
-
Save threez/6068459 to your computer and use it in GitHub Desktop.
Show that localhost can resolve to ::1 on MacOSX systems. Proven, if the client doesn't raise an error.
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
| require 'drb/drb' | |
| p DRb.start_service("druby://localhost:0") | |
| server = DRbObject.new_with_uri("druby://::1:5000") | |
| p server | |
| p server.foo |
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
| require 'drb/drb' | |
| class Service | |
| def foo | |
| 'bar' | |
| end | |
| end | |
| p DRb.start_service("druby://localhost:5000", Service.new) | |
| DRb.thread.join |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment