google.golang.org/appengine/channel 包 (v1.6.8)
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
软件包通道实现了 App Engine 的 Channel API 的服务器端。
Create 将创建一个与给定 clientID 相关的通道,对于将使用所返回的令牌的客户端,这个 clientID 必须是唯一的。
token, err := channel.Create(c, "player1")
if err != nil {
// handle error
}
// return token to the client in an HTTP response
Send 将通过 clientID 确定的通道向客户端发送一条消息。
channel.Send(c, "player1", "Game over!")
已弃用:Channel API 功能已弃用,即将被移除。如需了解详情和时间表,请参阅 Channel API 关停文档。
https://cloud.google.com/appengine/docs/deprecations/channel
函数
func Create(已弃用)
Create 创建一个通道,并返回供客户端使用的令牌。
clientID 是应用提供的用于标识客户端的字符串。
func Send(已弃用)
Send 使用与 clientID 相关的通道发送一条消息。
func SendJSON(已弃用)
SendJSON 是一个帮助程序函数,它通过与 clientID 相关的通道发送 JSON 编码的值。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2023-10-26。
[{
"type": "thumb-down",
"id": "hardToUnderstand",
"label":"Hard to understand"
},{
"type": "thumb-down",
"id": "incorrectInformationOrSampleCode",
"label":"Incorrect information or sample code"
},{
"type": "thumb-down",
"id": "missingTheInformationSamplesINeed",
"label":"Missing the information/samples I need"
},{
"type": "thumb-down",
"id": "translationIssue",
"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":"其他"
}]