Google Chrome Socket API in extensions

From the Chrome docs:

Packaged apps can act as a network client for TCP and UDP connections.

No, extensions do not have access to the socket API, and they aren’t likely to ever get it.

Your confusion is understandable, since what Google called “packaged apps” used to be nothing but glorified extensions with an icon on the home screen. However, Google is now driving a much wider divide between extensions and apps.

Extensions used to have a subset of the functionality the apps did, but now there is mutually exclusive functionality in each. Extensions are meant for enhancing normal Web browsing, whereas apps are meant to be used as stand-alone tools that do not interfere with normal browsing. If you look at the API lists for apps and for extensions, you’ll see that the list is vastly different: apps have the powerful hardware- and OS-centric APIs like socket, usb, and bluetooth, while extensions have a monopoly on browser-centric APIs like tabs, cookies, and bookmarks.

Leave a Comment