The browser and a board through the bridge
You need: a board set up, the
command line host, a prompt and a
browser tab. You have them when the board’s terminal prints === ready
and a prompt answers : 23.
A browser cannot open a UDP socket. The bridge, a program in the
language that comes with o.se.ws, carries datagrams to a tab as
WebSocket frames and frames back out to one destination, byte for byte,
one tab at a time. At the command line’s prompt, with a datagram port, a
WebSocket port and where frames go back to:
("o.se.ws/bridge.osen") /o/load, (9999, 8080, "tcp://192.168.1.101:8889") /ws/bridge
The same from a shell is tools/ws-bridge.sh --to tcp://192.168.1.101:8889
in unix.o.se. Put ws://localhost:8080 in the page’s socket field and
press Connect. A board that ships a raised machine to the bridge’s
datagram port has it opened in the playground as a tree; edited
and sent back, it goes to the destination as one frame. From the command line, with the bridge
running, ("127.0.0.1:9999") /continue/at at the prompt moves a program
into the tab the same way.