本頁內容屬於 Chrome 應用程式平台,該平台已於 2020 年淘汰。至少在 2025 年 1 月之前,ChromeOS 的 Enterprise 和 Education 客戶仍能享有支援。進一步瞭解如何
遷移應用程式 。
通訊端
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
重要事項: Chrome 將停止支援所有平台上的 Chrome 應用程式。Chrome 瀏覽器和
Chrome 線上應用程式商店將繼續支援擴充功能。查看公告 並學習
進一步瞭解如何遷移應用程式 。
sockets
資訊清單屬性會宣告 sockets.udp 可以使用的權限。
sockets.tcp 和 sockets.tcpServer API。
manifest.json 範例
{
"na me ": "My Socke ts app ",
"socke ts ": {
"udp ": {
// Permission for chrome.sockets.udp.send:
// The application is allowed to send udp packets
// to any host:port combination.
"se n d ": "* "
},
"t cp ": {
// Permission for chrome.sockets.tcp.connect:
// The application is allowed to connect only to the
// tcp server on 127.0.0.1 port 80.
"co nne c t ": "127.0.0.1 : 80 "
},
"t cpServer ": {
// Permission for chrome.sockets.tcpServer.listen:
// The application is allowed to accept new client
// connections on the local address at port 80.
"lis ten ": "127.0.0.1 : 80 "
}
},
...
}
參考資料
udp
(物件) - 選用
udp
資訊清單屬性會宣告應用程式可發出的 sockets.udp 作業。
類型 屬性 說明 字串或字串陣列 (選用) 繫結
bind
作業的 host:port 模式。
字串或字串陣列 (選擇性) 傳送
send
作業的 host:port 模式。
字串或字串陣列 (選用) 多點傳播成員資格
joinGroup
作業的 host:port 模式。
tcp
(物件) - 選用
tcp
資訊清單屬性會宣告應用程式可發出的 sockets.tcp 作業。
類型 屬性 說明 字串或字串陣列 (選用) 連線
connect
作業的 host:port 模式。
tcpServer
(物件) - 選用
tcpServer
資訊清單屬性會宣告應用程式可發出的哪些 sockets.tcpServer 作業。
類型 屬性 說明 字串或字串陣列 (選用) 聆聽
listen
作業的 host:port 模式。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權 ,程式碼範例則為阿帕契 2.0 授權 。詳情請參閱《Google Developers 網站政策 》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2014-01-08 (世界標準時間)。
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"缺少我需要的資訊"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"過於複雜/步驟過多"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"過時"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"翻譯問題"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"示例/程式碼問題"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"其他"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"容易理解"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"確實解決了我的問題"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"其他"
}]
{"lastModified": "\u4e0a\u6b21\u66f4\u65b0\u6642\u9593\uff1a2014-01-08 (\u4e16\u754c\u6a19\u6e96\u6642\u9593)\u3002"}
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2014-01-08 (世界標準時間)。"],[],[]]