从浏览器发送二进制数据

发布于 2024-12-08 22:33:56 字数 210 浏览 0 评论 0原文

我想知道如何以二进制类型从客户端向服务器发送数据?

我使用的是 Chrome 14,当我在客户端应用程序中发送 ArrayBuffer 时,我会收到一个 opcode 设置为 opText 的帧和一个字符串作为服务器应用程序中的帧数据“[object ArrayBuffer]”。

我应该怎么办?

I wanted to know what I must do for sending data in binary type from client to server?

I am using Chrome 14, and when I send an ArrayBuffer in the client application, I receive a frame with the opcode set to opText and a string as frame data "[object ArrayBuffer]"` in the server application.

What should I do?

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

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

发布评论

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

评论(1

原谅过去的我 2024-12-15 22:33:56

您应该下载最新的夜间版本,因为它仅在 Chrome 16 中实现(目前是开发者频道)。您还可以下载 Chrome Canary。

目前,在 Chrome 14/15 中,您只能发送字符串,因此 ArrayBuffer 会转换为字符串:someArrayBuffer.toString() === "[object ArrayBuffer]"< /代码>。

它已在 WebKit 修订版 94482 中实现,但 Chrome 14(内部版本第835章 835 href="http://src.chromium.org/viewvc/chrome/branches/835/src/DEPS?revision=98687&view=markup" rel="nofollow">WebKit 修订版 91698< /a>.

You should download the latest nightly build since it has only been implemented in Chrome 16 (currently that's the developer channel). You could also download Chrome Canary.

Currently, in Chrome 14/15, you can only send strings and as such, an ArrayBuffer is converted to a string: someArrayBuffer.toString() === "[object ArrayBuffer]".

It has been implemented in WebKit revision 94482, but Chrome 14 (build 835) only includes up to WebKit revision 91698.

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