Created
November 5, 2013 19:18
-
-
Save anonymous/7324533 to your computer and use it in GitHub Desktop.
iex remote node
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
Node A: | |
iex --sname "nodea" | |
iex> Process.register self, :iex | |
Node B: | |
iex --sname "nodeb" | |
iex> Node.connect :"nodea@myhostname" | |
true | |
parent = self | |
Node.spawn_link(:"nodea@myhostname", fn -> | |
parent <- Process.whereis(:iex) | |
end) | |
receive do | |
iex_pid -> iex_pid | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment