问题
Is it possible to use WebSocket
over AF_UNIX
sockets (Unix-domain sockets)? Is it technically possible, and if so, do any implementations (mainly browser runtimes) support it?
回答1:
Yes, this is possible. AutobahnPython supports running WebSocket over any stream-based transport supported by Twisted like:
- TCP
- TLS
- Unix Domain Socket
- Pipes
- Serial
Please see here.
FWIW, it also supports tunneling any stream-based protocol over WebSocket. E.g. it allows you to run SSH over WebSocket (over any stream-based protocol).
As far as I know, no browser supports anything but TCP/TLS for WebSocket as underyling transport.
来源:https://stackoverflow.com/questions/23733152/websocket-over-af-unix-socket