Closed metacoma closed 5 years ago
from plan9@irc.freenode.net
20:40 < henesy> So you could probably write a server-side websocket listener
20:40 < henesy> Then write a websocket 9p client in that somehow translates to something on the web page
20:40 < henesy> To listen for websockets you basically need a full http stack so it’ll be kinda heavy
20:40 < henesy> This is probably trivial in Go tho
https://github.com/novnc/websockify https://github.com/novnc/websockify-other/tree/master/c
Native plan9 websocket2p9 app https://bitbucket.org/dhoskin/weebsocket/src/default/
intermediate result in 3_js_styx branch
$ git clone https://github.com/metacoma/9sandbox
$ cd 9sandbox
$ git checkout 3_js_styx
$ docker-compose build
$ docker-compose pull
$ docker-compose up
....
$ docker-compose exec nodejs-sandbox nodejs
> var _9p = require('9p');
> var WebSocket = require('ws')
> var sock = new _9p.WebSocketReadWriter("ws://http/alpha")
> var enc = new _9p.Encoder(sock)
> var decoder = new _9p.Decoder(sock)
> enc.tattach(0,1,"foobar", "/")
http://9p.cat-v.org/implementations
http://man.cat-v.org/plan_9/2/9p