Browse Source

Connect guest network adapters (#704)

You'll still need to assign a static IP to each VM, but they can communicate!
hello-smile6 1 year ago
parent
commit
a50c6e2bbc
1 changed files with 8 additions and 0 deletions
  1. 8 0
      examples/two_instances.html

+ 8 - 0
examples/two_instances.html

@@ -64,6 +64,14 @@ window.onload = function()
     {
         emulator2.serial0_send(char);
     });
+    emulator1.add_listener("net0-send", function(data)
+    {
+        emulator2.bus.send("net0-receive", data);
+    });
+    emulator2.add_listener("net0-send", function(data)
+    {
+        emulator1.bus.send("net0-receive", data);
+    });
 };
 </script>