1
0
mirror of https://github.com/Mrs4s/MiraiGo.git synced 2025-05-04 11:07:40 +08:00

Merge pull request #338 from 1umine/master

提供外部可调用的函数 'SendSsoPacket' 供提交回调给签名服务器
This commit is contained in:
Mrs4s 2023-07-30 21:39:47 +08:00 committed by GitHub
commit d344e0f318
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -310,6 +310,13 @@ func (c *QQClient) sendAndWaitDynamic(seq uint16, pkt []byte) ([]byte, error) {
} }
} }
// SendSsoPacket
// 发送签名回调包给服务器并获取返回结果供提交
func (c *QQClient) SendSsoPacket(cmd string, body []byte) ([]byte, error) {
seq, data := c.uniPacket(cmd, body)
return c.sendAndWaitDynamic(seq, data)
}
// plannedDisconnect 计划中断线事件 // plannedDisconnect 计划中断线事件
func (c *QQClient) plannedDisconnect(_ *network.TCPClient) { func (c *QQClient) plannedDisconnect(_ *network.TCPClient) {
c.debug("planned disconnect.") c.debug("planned disconnect.")