MCPcopy Create free account
hub / github.com/LagrangeDev/LagrangeGo / uniPacket

Method uniPacket

client/packet.go:9–23  ·  view source on GitHub ↗
(command string, body []byte)

Source from the content-addressed store, hash-verified

7)
8
9func (c *QQClient) uniPacket(command string, body []byte) (uint32, []byte, error) {
10 seq := c.getAndIncreaseSequence()
11 sign, err := c.signProvider.Sign(command, seq, body)
12 if err != nil {
13 return 0, nil, err
14 }
15 req := network.Request{
16 SequenceID: seq,
17 Uin: int64(c.Uin),
18 Sign: sign,
19 CommandName: command,
20 Body: body,
21 }
22 return seq, c.transport.PackPacket(&req), nil
23}

Callers 2

sendUniPacketAndWaitMethod · 0.95
SendSsoPacketMethod · 0.95

Calls 3

PackPacketMethod · 0.80
SignMethod · 0.65

Tested by

no test coverage detected