11

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?

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

JJJ
  • 32,902
  • 20
  • 89
  • 102
Xinus
  • 29,617
  • 32
  • 119
  • 165

2 Answers2

6

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.

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.

kanaka
  • 70,845
  • 23
  • 144
  • 140
  • @jnnnnn, yes, they seem to move it around a lot. I've update the link to an packaged app version of the link. It may still be available for extensions but it's not clear. – kanaka Jun 25 '13 at 17:19
  • 2
    @kanaka, Is this possible in Chrome extensions? The API you linked to is for Chrome Apps. – Pacerier Jun 20 '15 at 16:54
4

These are not websockets (it's TCP or UDP sockets):

http://developer.chrome.com/apps/socket.html

https://developers.google.com/live/shows/7320022-5001

The second link is a howto for making a web-server in a Chrome app.

konsumer
  • 3,411
  • 1
  • 30
  • 31