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

Function NewClientMD5

client/base.go:43–61  ·  view source on GitHub ↗
(uin uint32, passwordMD5 [16]byte)

Source from the content-addressed store, hash-verified

41}
42
43func NewClientMD5(uin uint32, passwordMD5 [16]byte) *QQClient {
44 cookieContainer, _ := cookiejar.New(&cookiejar.Options{PublicSuffixList: publicsuffix.List})
45 client := &QQClient{
46 Uin: uin,
47 oicq: oicq.NewCodec(int64(uin)),
48 PasswordMD5: passwordMD5,
49 ticket: &TicketService{
50 client: &http.Client{Jar: cookieContainer},
51 sKey: &keyInfo{},
52 },
53 alive: true,
54 }
55 client.transport.Sig.D2Key = make([]byte, 0, 16)
56 client.highwaySession.Uin = &client.transport.Sig.Uin
57 client.Online.Store(false)
58 client.TCP.PlannedDisconnect(client.plannedDisconnect)
59 client.TCP.UnexpectedDisconnect(client.unexpectedDisconnect)
60 return client
61}
62
63type QQClient struct {
64 Uin uint32

Callers 2

NewClientFunction · 0.85
NewClientEmptyFunction · 0.85

Calls 3

NewCodecFunction · 0.92
PlannedDisconnectMethod · 0.80
UnexpectedDisconnectMethod · 0.80

Tested by

no test coverage detected