bash-websocket-server:用 bash 编写的 Websocket 服务器

时间:2021-07-06 01:31:29
【文件属性】:
文件名称:bash-websocket-server:用 bash 编写的 Websocket 服务器
文件大小:3KB
文件格式:ZIP
更新时间:2021-07-06 01:31:29
Shell Bash Websocket 服务器 这是一个用 bash 编写的 websocket 服务器,它使用netcat和openssl 。 我这样做是因为我想用 bash 写一些东西,我需要一种方法来向浏览器发送推送通知之类的东西。 也就是说,该服务器不接收消息,只发送消息。 它适用于Chrome。 ##包含的文件 index.html - 这是一个示例网页,用于设置 websocket 连接并在收到消息时执行操作。 pipe_to_websocket.sh - 这是接受命名管道作为其单个参数的服务器。 当客户端连接到它时,它会进行 websocket 握手,然后将通过命名管道传入的任何数据发送到客户端。 run - 运行服务器的脚本。 它设置一个命名管道并将来自 stdin 的任何输入转发给它。 ##去做 清理 bash(里面有一些 korn shell 语法) 也许包括接收消息
【文件预览】:
bash-websocket-server-master
----pipe_to_websocket.sh(2KB)
----index.html(843B)
----.gitignore(6B)
----run(503B)
----README.md(1KB)

网友评论