在浏览器中从 udp 端口读取 [英] Reading from udp port in browser
问题描述
除了 Java Applet 之外,还有什么我们可以从 UDP 套接字中读取数据的吗?我知道 websockets 是 TCP 套接字,但我需要通过 udp 套接字、HTML5 中的任何内容或任何内容与服务器通信?我在两年前看过这篇文章:两年前,还有这篇文章来自
Aside from Java Applet, is there anyway we can read from an UDP socket? I know websockets are TCP sockets, but I need to communicate with a server via udp sockets, anything in HTML5, or anything at all? I have looked at this post from: two years ago and this one as well again from two years ago no UDP. I was wondering if there is any new way now that we are in 2013 to use the browser to communicate with a server via udp socket?
推荐答案
由于分布式拒绝服务 (DDOS) 攻击等安全限制,无法在 Javascript 中完成您要查找的内容.可用于客户端 JS 的最接近的技术(据我所知)是 WebRTC.
What you are looking for can't be done with in Javascript due to security constraints such as Distributed Denial of Service (DDOS) attacks. The closest technology available (that I know of) for client-side JS is WebRTC.
通过 WebRTC,您可以使用 DataChannels over SRTP 和 ICE 作为可能的解决方案.
With WebRTC you can use DataChannels over SRTP and ICE as a possible solution.
另见:
这篇关于在浏览器中从 udp 端口读取的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!