在浏览器中从 udp 端口​​读取 [英] Reading from udp port in browser

查看:34
本文介绍了在浏览器中从 udp 端口​​读取的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

除了 Java Applet 之外,还有什么我们可以从 UDP 套接字中读取数据的吗?我知道 websockets 是 TCP 套接字,但我需要通过 udp 套接字、HTML5 中的任何内容或任何内容与服务器通信?我在两年前看过这篇文章:两年前,还有这篇文章来自两年前没有 UDP.我想知道现在我们在 2013 年是否有任何新的方式来使用浏览器通过 udp socket 与服务器通信?

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屋!

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