Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / chrome / common / extensions / docs / templates / articles / manifest / sockets.html
blob8c4533fc234e47fe5b9da86c9c7bb447976b44d0
1 <h1>sockets</h1>
3 <p>
4 The <code>sockets</code> manifest property declares which permissions are
5 available for the $(ref:sockets.udp), $(ref:sockets.tcp) and
6 $(ref:sockets.tcpServer) APIs.
7 </p>
9 <h2 id="manifest">Sample manifest.json</h2>
10 <pre data-filename="manifest.json">
12 "name": "My Sockets {{platform}}",
13 "sockets": {
14 "udp": {
15 // Permission for chrome.sockets.udp.send:
16 // The application is allowed to send udp packets
17 // to any host:port combination.
18 "send": "*"
20 "tcp": {
21 // Permission for chrome.sockets.tcp.connect:
22 // The application is allowed to connect only to the
23 // tcp server on 127.0.0.1 port 80.
24 "connect": "127.0.0.1:80"
26 "tcpServer": {
27 // Permission for chrome.sockets.tcpServer.listen:
28 // The application is allowed to accept new client
29 // connections on the local address at port 80.
30 "listen": "127.0.0.1:80"
33 ...
35 </pre>
37 <section>
38 <h2 id="reference">Reference</h2>
39 <p class="api_reference">
40 {{+partials.manifest_type
41 type:apis.apps.extensionsManifestTypes.byName.sockets/}}
42 </p>
43 </section>