There's documentation about chrome.sockets
on http://developer.chrome.com/ , but I can't find anything concerning chrome.experimental.sockets
on http://code.google.com/ any more. Dear Chromium developers, please tell me: What happened? Thanks. (I don't want to miss this wonderful API.)
Asked
Active
Viewed 2,199 times
2

fridojet
- 1,276
- 3
- 15
- 29
1 Answers
4
The Socket API is only available to Packaged apps (source). This is the reason why the API is listed at the /apps/
API index, but not /extensions/
.
If you try to use the API in an ordinary extension, the extension will fail to load, or be loaded with the following message:
-
1@OP You might be interested in http://stackoverflow.com/questions/11453108/where-can-i-see-which-chrome-extensions-api-is-valid-for-which-chrome-version/11454451#11454451, specifically http://www.chromium.org/developers/design-documents/extensions/how-the-extension-system-works/docs/how-docs-are-served. – Rob W Aug 06 '12 at 14:09
-
I can see `chrome.socket` there. But it's not listed on [trunk's API index](http://code.google.com/chrome/extensions/trunk/api_index.html). Any idea? – fridojet Aug 06 '12 at 14:12
-
1@fridojet Don't worry about that. The documentation is auto-generated, but some pages have to be edited manually, [including `api_index.html`](http://src.chromium.org/viewvc/chrome/trunk/src/chrome/common/extensions/docs/extensions/api_index.html?view=log). – Rob W Aug 06 '12 at 14:18
-
Everything's fine as long as this API doesn't get removed. – fridojet Aug 06 '12 at 14:55
-
1@fridojet Considering that the API passed the experimental stage ("`chrome.experimental.socket`" -> "`chrome.socket`"), it's likely that the API stays. – Rob W Aug 06 '12 at 14:56
-
1@fridojet I revised my answer, FYI. – Rob W Nov 18 '12 at 10:01