sockets 清单属性声明了适用于 sockets.udp 的权限,
sockets.tcp 和 sockets.tcpServer API。
manifest.json 示例
{
  "name": "My Sockets app",
  "sockets": {
    "udp": {
      // Permission for chrome.sockets.udp.send:
      // The application is allowed to send udp packets
      // to any host:port combination.
      "send": "*"
    },
    "tcp": {
      // Permission for chrome.sockets.tcp.connect:
      // The application is allowed to connect only to the
      // tcp server on 127.0.0.1 port 80.
      "connect": "127.0.0.1:80"
    },
    "tcpServer": {
      // Permission for chrome.sockets.tcpServer.listen:
      // The application is allowed to accept new client
      // connections on the local address at port 80.
      "listen": "127.0.0.1:80"
    }
  },
  ...
}
参考
udp(对象)- 可选udp清单属性声明应用可以发出哪些 sockets.udp 操作。类型 属性 说明 字符串或字符串数组 (可选)绑定 bind操作的 host:port 模式。字符串或字符串数组 (可选)发送 send操作的 host:port 模式。字符串或字符串数组 (可选)multicastMembership joinGroup操作的 host:port 模式。tcp(对象)- 可选tcp清单属性声明应用可以发出哪些 sockets.tcp 操作。类型 属性 说明 字符串或字符串数组 (可选)关联 connect操作的 host:port 模式。tcpServer(对象)- 可选tcpServer清单属性声明应用可以发出哪些 sockets.tcpServer 操作。类型 属性 说明 字符串或字符串数组 (可选)收听 listen操作的 host:port 模式。