title: 'chrome.sockets.tcp' in a PWA?
body: <p>I am creating a PWA using Nuxt and I want to use the Chrome TCP API to communicate with TCP devices directly. The API is detailed here <a href="https://developer.chrome.com/apps/sockets_tcp" rel="nofollow noreferrer">https://developer.chrome.com/apps/sockets_tcp</a></p>
  
  <p>I have confirmed that clients are downloading it when they access the page.</p>
  
  <p>manifest.json</p>
  
  <pre><code>{
     "name":"pwa-demo",
     "short_name":"pwa-demo",
     "description":"Test App",
     "publicPath":"//_nuxt/",
     "icons":[
        {
           "src":"/_nuxt/icons/icon_64.fj_mLYH_Zr_.png",
           "sizes":"64x64",
           "type":"image/png"
        }
     ],
     "start_url":"/?standalone=true",
     "display":"standalone",
     "background_color":"#ffffff",
     "theme_color":false,
     "lang":"en",
     "sockets":{
        "tcp":{
           "connect":[
              "*:8023"
           ]
        }
     }
  }
  </code></pre>
  
  <p>However, when the PWA is run in the browser or after installation (both on desktop and Android) in all cases I get the following error trying to call a chrome.sockets.tcp API: <code>TypeError: Cannot read property 'tcp' of undefined</code></p>
  
  <p>The Chrome "apps" API (<a href="https://developer.chrome.com/apps" rel="nofollow noreferrer">https://developer.chrome.com/apps</a>) does seem to suggest that it is meant to be done using Cordova but I figured that that suggestion was old (there's other content on the page from 2014) and that once a PWA is installed there shouldn't be a functional difference between an installed Cordova app and a new installed PWA. They're both wrappers around a Chrome WebView (except of course Cordova can expose more native APIs).</p>
  
  <p>I am guessing that the chrome.sockets.tcp API is actually exposed through the Cordova wrapper and not Chrome itself, but I have not found anything that confirms this. Google has publicly expressed that they want PWAs to replace Chrome Apps so one would hope that the API was moved into Chrome itself. There seems to be a lot of people confused about whether it can be used by Chrome extensions too.</p>
  
  <p>Is my manifest wrong? Or can someone <em>confirm</em> that this API is not usable by PWAs? </p>