diff --git a/Readme.md b/Readme.md index b20eddbcb6..cbbc42f9d8 100644 --- a/Readme.md +++ b/Readme.md @@ -168,6 +168,7 @@ See [tests/Readme.md](tests/Readme.md) for more information. - [Programatically using the serial terminal](examples/serial.html) - [A Lua interpreter](examples/lua.html) - [Two instances in one window](examples/two_instances.html) +- [Networking between browser windows/tabs using the Broadcast Channel API](examples/broadcast-network.html) - [Saving and restoring emulator state](examples/save_restore.html) Using v86 for your own purposes is as easy as: diff --git a/examples/broadcast-network.html b/examples/broadcast-network.html new file mode 100644 index 0000000000..c879c9c086 --- /dev/null +++ b/examples/broadcast-network.html @@ -0,0 +1,59 @@ + +Networking via Broadcast Channel API + + + + +
+
+ +
+ +
+# Configure a static IP
+ifconfig eth0 up arp 10.5.0.x
+
+# Ping by IP
+ping 10.5.0.x
+
+# Run a DNS server and send a query (10.5.0.x for server, 10.5.0.y for record)
+echo "anotherhost 10.5.0.y" | dnsd -c - -v    - server
+nslookup -type=a anotherhost 10.5.0.x         - client
+
+# Telnet calculator
+socat TCP-L:23,fork exec:bc
+
+# Simple HTTP server
+socat TCP-L:80,crlf,fork system:'echo HTTP/1.1 200 OK;echo;lua /root/test.lua'
+