在 rebol 中实现 websocket 协议 (ws) 是否有简单的独立代码示例?

发布于 2024-09-10 23:53:10 字数 1537 浏览 1 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

二智少女猫性小仙女 2024-09-17 23:53:10

我通过查看这个java示例来编写此内容: http://github.com/adamac/Java-WebSocket-client/blob/master/src/com/sixfire/websocket/WebSocket.java

并仅使用此 ws 聊天服务器进行测试 http://www.codeproject.com/KB/webservices/c_sharp_web_socket_server.aspx

它支持帧(0x00 - - 0xFF),当您选择端口时,它返回最后一个,如果没有消息则不返回。
目前它不支持数据帧(0x80 - 0xFE),也不支持 utf8。

以此为例。

I write this by looking at this java example: http://github.com/adamac/Java-WebSocket-client/blob/master/src/com/sixfire/websocket/WebSocket.java

and tested only with this ws chat server http://www.codeproject.com/KB/webservices/c_sharp_web_socket_server.aspx

it supports framing (0x00 - - 0xFF), when you pick the port it returns the last , if no msg then returns none.
currently it does not support data frames (0x80 - 0xFE) and no support for utf8.

Take it as an example.

红尘作伴 2024-09-17 23:53:10

我最近看了这个,编写一个 ws:// 协议看起来并不需要很长时间,而且看起来非常简单。也许你可以尝试自己写一下。

好吧,自从我写这篇文章以来,Endo 发布了他的 ws:// 协议

http://www. Moldibi.com/rebol/ws.html

I looked at this recently and writing a ws:// protocol does not look like it will take long, and looks to be quite straight forward. Perhaps you could try writing it yourself.

Well, since I wrote this, Endo has released his ws:// protocol

http://www.moldibi.com/rebol/ws.html

苦妄 2024-09-17 23:53:10

仅作为记录,我的 Rebol3 HTTPd Web 服务器模块具有内置 WebSocket 支持: https://github .com/Oldes/Rebol-HTTPd

Just for a record, my HTTPd web server module for Rebol3 has built-in WebSocket support: https://github.com/Oldes/Rebol-HTTPd

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文