(uin uint32, passwordMD5 [16]byte)
| 41 | } |
| 42 | |
| 43 | func 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 | |
| 63 | type QQClient struct { |
| 64 | Uin uint32 |
no test coverage detected