This commit is contained in:
shoopea 2020-06-14 17:33:05 +02:00
parent 0a56868b9f
commit c8b3f3e826

5
def.go
View File

@ -61,10 +61,15 @@ func (p *PacketAdminJoin) Bytes() []byte {
p.PLength = uint16(len(p.Password) + len(p.AppName) + len(p.AppVersion) + 3) p.PLength = uint16(len(p.Password) + len(p.AppName) + len(p.AppVersion) + 3)
binary.Write(buf, binary.LittleEndian, p.PLength) binary.Write(buf, binary.LittleEndian, p.PLength)
logInfoDebug("len : %d", buf.Len())
binary.Write(buf, binary.LittleEndian, p.PType) binary.Write(buf, binary.LittleEndian, p.PType)
logInfoDebug("len : %d", buf.Len())
buf.WriteString(p.Password) buf.WriteString(p.Password)
logInfoDebug("len : %d", buf.Len())
buf.WriteString(p.AppName) buf.WriteString(p.AppName)
logInfoDebug("len : %d", buf.Len())
buf.WriteString(p.AppVersion) buf.WriteString(p.AppVersion)
logInfoDebug("len : %d", buf.Len())
return buf.Bytes() return buf.Bytes()
} }