Remove serial.Bytes

This commit is contained in:
v2ray
2016-05-24 22:09:22 +02:00
parent fc63f0432c
commit ab39750ceb
12 changed files with 35 additions and 68 deletions
+2 -2
View File
@@ -73,9 +73,9 @@ func (this *AuthChunkReader) Read() (*alloc.Buffer, error) {
}
}
log.Debug("VMess Reader: raw buffer: ", buffer.Value)
length := serial.BytesT(buffer.Value[:2]).Uint16Value()
length := serial.BytesToUint16(buffer.Value[:2])
this.chunkLength = int(length) - 4
this.validator = NewValidator(serial.BytesT(buffer.Value[2:6]).Uint32Value())
this.validator = NewValidator(serial.BytesToUint32(buffer.Value[2:6]))
buffer.SliceFrom(6)
} else if buffer.Len() < this.chunkLength {
_, err := buffer.FillFrom(this.reader)