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 https://bugzilla.mozilla.org/show_bug.cgi?id=1079648 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 https://bugzilla.mozilla.org/show_bug.cgi?id=1038533 However, https://github.com/mykmelez/tcpsocketpup 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: https://groups.google.com/d/msg/mozilla.dev.b2g/UB1CFnVy0mc/EQjRDt_YfZoJ And the TCPSocket-specific sub-thread I reaised: https://groups.google.com/d/msg/mozilla.dev.b2g/67KvfP0ZETk/UhZmm9APALcJ 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. Andrew On Tue, Sep 8, 2015, at 12:57 PM, Jovan Gerodetti wrote: > Hey everyone, > > Quick question. > Is the TCPSocket also available in the WebRT for Desktop Apps or is it > FxOS > only? > > Regards, > Jovan > _______________________________________________ > dev-webapps mailing list > dev-webapps@lists.mozilla.org > https://lists.mozilla.org/listinfo/dev-webapps _______________________________________________ dev-webapps mailing list dev-webapps@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-webapps