从chrome发送udp数据包 [英] Send udp packet from chrome

查看:603
本文介绍了从chrome发送udp数据包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在互联网上进行研究(如何将udp发送到udp node.js服务器?带有UDP的JavaScript WebSockets?)我发现使用javascript发送udp数据包是不可能的。

Researching on the internet ( How to send udp to udp node.js server?, JavaScript WebSockets with UDP?) I have found that it is not possible to send udp packets with javascript.

另一方面,有些页面声称Chrome浏览器能够这样做。例如链接:

On the other hand some pages claim that chrome browser is able to do so. For example the link:

http: //blog.alexmaccaw.com/chrome-tcp-udp

声称谷歌浏览器能够发送udp数据包。也许我做错了什么。如果chrome可以发送udp数据包,我会很感激,如果有人可以发布 hello world 示例。我已经尝试了我展示的链接中的示例,但它不起作用。也许我做错了什么。

claims that google chrome is able to send udp packets. Maybe I am doing something wrong. If it is true that chrome can send udp packets I will appreciate if someone can post a hello world example. I have tried the example from the link I showed and it does not work. Maybe I am doing something wrong.

推荐答案

来自链接页面


Chrome Canary现在支持其
中的原始TCP和UDP套接字'实验'API 。这些功能仅适用于扩展程序
,虽然已记录,但目前仍处于隐藏状态。

Chrome Canary now has support for raw TCP and UDP sockets in its ‘experimental’ APIs. These features are only available for extensions and, although documented, are hidden for the moment.

所以,开发一个扩展,它应该工作。实际上,那篇来自5月的文章似乎已经过时,因为 chrome.socket 模块现在已经失去了 experimental 状态。对于HelloWorld,您可以查看他们的 udp示例从官方网页链接。

So, develop an extension and it should work. Actually, that article from May '12 seems to be outdated as the chrome.socket module now has lost its experimental status. For the HelloWorld, you might check out their udp sample which is linked from the official pages.

这篇关于从chrome发送udp数据包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆