NAME
websocket – tunnel 9P over WebSocket |
SYNOPSIS
websocket magic parameters ...
new WebSocket("http://server.example/magic/websocket", "9p"); |
DESCRIPTION
Websocket is an httpd(8) magic program that tunnels a 9P connection
over a WebSocket, allowing JavaScript programs in a web browser
to interact with Plan 9 services.
Currently, it always mounts the connection over /dev/ and launches
acme, which expects the /dev/draw provided by 9webdraw. |
SOURCE
/sys/src/cmd/ip/httpd/websocket.c
https://bitbucket.org/dhoskin/weebsocket/ |
SEE ALSO
intro(5), httpd(8)
https://bitbucket.org/dhoskin/9webdraw |
BUGS
The command /bin/acme is hardcoded. No authentication is performed, and raw 9P is used rather than cpu(1)'s protocol. Rather than hardcoding 9P, plugins for different protocols could be chosen using the WebSocket subprotocol header.
Rather than running under httpd(8), websocket could present a
standard network connection directory in /net/websocket. |