Feat: add query params
This commit is contained in:
@@ -4,6 +4,8 @@ import (
|
||||
"encoding/binary"
|
||||
"io"
|
||||
"net"
|
||||
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -19,6 +21,11 @@ func readFrame(conn net.Conn) ([]byte, error) {
|
||||
|
||||
messageLength := binary.BigEndian.Uint32(lengthBytes)
|
||||
|
||||
if messageLength > 65536 {
|
||||
zap.L().Warn("message length exceed",
|
||||
zap.Uint32("length", messageLength))
|
||||
}
|
||||
|
||||
payload := make([]byte, messageLength)
|
||||
_, err = io.ReadFull(conn, payload)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user