如何在Google Chrome扩展程序中创建套接字? [英] How to create sockets in google chrome extension?

查看:63
本文介绍了如何在Google Chrome扩展程序中创建套接字?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我为Google chrome http://code.google.com创建了一个小型的hello世界扩展./chrome/extensions/getstarted.html .我需要使用扩展套接字以使用UDP进行对等通信.谷歌浏览器是否有任何与Firefox相同的 Jslib 或我们如何在谷歌浏览器扩展中使用其他语言?

I created small hello world extension for google chrome http://code.google.com/chrome/extensions/getstarted.html. I need to use sockets in extension for peer to peer communication using UDP. Is there any firefox Jslib equivalent in google chrome or how we can use other languages in google chrome extension?

我怀疑它在Google chrome中是否可行,请查看其文档.?还有其他方法可以实现扩展中的p2p通信吗?

I doubt its possible in google chrome, looking at its documentation. ? Are there any other ways to achieve p2p communication in extension?

推荐答案

Chrome对原始套接字连接.有关更多常规信息,请此处.以前,扩展程序也可以使用此功能,但尚不清楚是否仍然如此.

Chrome has an packaged app support for raw socket connections. More general info here. This used to be available to extensions as well but it's not clear if that's still true.

文档表明,创建套接字时,该类型仅 UDP 可用.但是,最近(2012年1月)有一个承诺添加TCP支持.

The documentation indicates that only UDP is available for the type when the socket is created. However, recently (Jan 2012) there was a commit adding TCP support.

这篇关于如何在Google Chrome扩展程序中创建套接字?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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