“使用”什么? WebSockets 我需要指令吗

发布于 2024-12-02 02:34:40 字数 231 浏览 0 评论 0原文

我对 C# 有点陌生,对 Websockets 也很陌生。我需要修改使用套接字的现有应用程序以使用 WebSockets,但是编译器给出了臭名昭著的错误

...您是否缺少 using 指令或程序集引用?

所以,显然我错过了一些东西,但是什么呢?

另外,有没有办法强制浏览器使用特定版本的 WebSockets?

非常感谢大家!

I'm somewhat new to C# and very new to Websockets. I need to modify an existing application that uses sockets to use WebSockets, but the compiler gives the infamous

... are you missing a using directive or an assembly reference?

So, obviously I am missing something, but what?

Also, is there a way to force a browser to use a particular version of WebSockets?

Thanks much everyone!

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

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

发布评论

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

评论(1

海的爱人是光 2024-12-09 02:34:40

您需要下载并安装 websocket 服务器实现。我目前正在使用 此处 找到的 HTML5Labs 原型。请注意,这是 hybi 规范版本 9,仅适用于支持新 hybi 技术的浏览器(当然是 EG、Chrome,我认为 FF7 也可以)。它不适用于 FF <= 6 或 Safari,当然,IE 目前还没有本机 websockets 支持。据我所知,没有办法指定不同版本的 websockets 用于您的浏览器。

You need to download and install a websocket server implementation. I'm currently using the prototype from HTML5Labs found here. Note that this is a hybi spec version 9 and will only work with browsers that support the new hybi technology (EG, Chrome for sure, and I think FF7 might as well). It will not work with FF <= 6 or Safari and, of course, IE has no native websockets support as of yet. As far as I know, there is no way to specify a different version of websockets to use for your browser.

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