google.golang.org/appengine/socket 包 (v1.6.8)
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
数据包套接字可提供出站网络套接字。
此数据包仅在经典 App Engine 环境中是必需的。
仅在 App Engine“柔性环境”中运行的应用应使用标准库的净数据包。
函数
func LookupIP
Conn
Conn 代表套接字连接。
它将实现 net.Conn。
func Dial
Dial 会连接到网络协议上的地址 addr。
地址格式为 host:port,其中 host 可能是主机名或 IP 地址。
已知协议为“tcp”和“udp”。
返回的连接符合 net.Conn,并且在 ctx 有效期间有效;如果要在 ctx 无效后使用该连接,请通过新的上下文调用 SetContext。
func DialTimeout
DialTimeout 类似于 Dial,但会接收超时。
超时包括名称解析(如果需要)。
func (*Conn) KeepAlive
KeepAlive 表示连接仍在使用中。
可以调用它来防止套接字因不活动而被关闭。
func (*Conn) SetContext
SetContext 可设置此 Conn 使用的上下文。通常,仅当使用在不同上下文中创建的 Conn 时才使用 SetContext,例如以下情况:在预热请求期间创建一个连接,但在处理用户请求期间使用该连接。
如未另行说明,那么本页面中的内容已根据知识共享署名 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":"其他"
}]