Remove TLS requirement for gRPC client

This commit is contained in:
Hellojack
2023-04-04 21:09:08 +08:00
committed by 世界
parent 3a92bf993d
commit ec2d0b6b3c
5 changed files with 42 additions and 38 deletions

View File

@@ -117,6 +117,7 @@ func (c *GunConn) WriteBuffer(buffer *buf.Buffer) error {
dataLen := buffer.Len()
varLen := rw.UVariantLen(uint64(dataLen))
header := buffer.ExtendHeader(6 + varLen)
_ = header[6]
header[0] = 0x00
binary.BigEndian.PutUint32(header[1:5], uint32(1+varLen+dataLen))
header[5] = 0x0A