Last active
August 29, 2015 14:23
-
-
Save stochastic-thread/c3116ff1e069e29bde46 to your computer and use it in GitHub Desktop.
Networking question
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
| # From MacBookPro: | |
| iex --name two@192.168.1.255 --cookie monster | |
| :global.register_name(:two, :erlang.group_leader) | |
| # From Windows8: | |
| iex --name one@192.168.1.14 --cookie monster | |
| two = :global.register_name :two, :erlang.group_leader | |
| # Then from Windows8, I can run this: | |
| two |> IO.puts "Hey there!" | |
| # and it prints to MacBookPro's iex session. | |
| # Awesome! | |
| # How can I do the reverse now? | |
| # I tried to do | |
| :global.register_name(:one, :erlang.node) | |
| # but that didn't work because | |
| :erlang.group_leader | |
| # is a PID but | |
| :erlang.node | |
| # is an atom. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment