Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.

Is TCPSocket available in WebRT

Skip to first unread message

Jovan Gerodetti

Sep 8, 2015, 12:57:49 PM9/8/15
Hey everyone,

Quick question.
Is the TCPSocket also available in the WebRT for Desktop Apps or is it FxOS


Andrew Sutherland

Sep 8, 2015, 1:19:28 PM9/8/15
Preference-wise, mozTCPSocket is available in WebRT. It requires the
"tcp-socket" permission is granted to the origin in question (or the
origin have the system principal). It is not available in desktop
Firefox without flipping a pref, "dom.mozTCPSocket.enabled". (WebRT
flips the pref by default.) See for some more
details re: the preference.

In order to have the permission granted, the app needs to be a packaged
app in the firefox marketplace. There's no way to use WebIDE to
"side-load" to accomplish this. See

However, can be used to grant
the permission to any origin for development. This will flip the
"dom.mozTCPSocket.enabled" preference to true as well.

As one might surmise from all of this, I don't think it's a particularly
supported set of functionality for desktop at this time. TCPSocket is
no longer on a standardization track, and based on recent discussions,
may be headed for being an "add-on" API. See Jonas's sensitive API
thread here:

And the TCPSocket-specific sub-thread I reaised:

The summary is probably that:
- TCPSocket is a known useful API
- It's still particularly dangerous and hard to explain that danger to
users which means it is likely to be gated by some type of human-review
for the default installation experience.

> _______________________________________________
> dev-webapps mailing list

Jovan Gerodetti

Sep 8, 2015, 1:29:27 PM9/8/15
to Andrew Sutherland,
Thank you Andrew!

We are currently trying to make Loqui IM also available on Desktop clients
so I was wondering if we'd be able still support all of our providers, also
thous we are connecting to with a mozTCPSocket.

Andrew Sutherland

Sep 8, 2015, 1:33:23 PM9/8/15
to Jovan Gerodetti,
Then I think it should work!  (Noting that for development/debugging you
may want/need to use the extension to help out.)

0 new messages