websocket 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. .TH WEBSOCKET 8
  2. .SH NAME
  3. websocket \- tunnel 9P over WebSocket
  4. .SH SYNOPSIS
  5. .B websocket
  6. .I "magic parameters" ...
  7. .PP
  8. .B
  9. new WebSocket("http://server.example/magic/websocket", "9p");
  10. .SH DESCRIPTION
  11. .I Websocket
  12. is an
  13. .IR httpd (8)
  14. .I magic
  15. program that tunnels a 9P connection over a WebSocket, allowing
  16. JavaScript programs in a web browser to interact with Plan 9 services.
  17. .PP
  18. Currently, it always mounts the connection over
  19. .B /dev/
  20. and launches
  21. .IR acme ,
  22. which expects the
  23. .B /dev/draw
  24. provided by
  25. .IR 9webdraw .
  26. .SH SOURCE
  27. .B /sys/src/cmd/ip/httpd/websocket.c
  28. .PP
  29. .B https://bitbucket.org/dhoskin/weebsocket/
  30. .SH "SEE ALSO"
  31. .IR intro (5),
  32. .IR httpd (8)
  33. .PP
  34. .B https://bitbucket.org/dhoskin/9webdraw
  35. .SH BUGS
  36. The command
  37. .B /bin/acme
  38. is hardcoded.
  39. .PP
  40. No authentication is performed, and raw 9P is used rather than
  41. .IR cpu (1)'s
  42. protocol.
  43. .PP
  44. Rather than hardcoding 9P, plugins for different protocols could
  45. be chosen using the WebSocket subprotocol header.
  46. .PP
  47. Rather than running under
  48. .IR httpd (8),
  49. .I websocket
  50. could present a standard network connection directory in
  51. .BR /net/websocket .