chore: optimize code
Build / Build (push) Has been cancelled

This commit is contained in:
nadoo committed 2026-11-16 21:08:27 +08:00
1 parent 9eadb8d9f4
commit a7d0421c93
15 files changed
+422 -171

No files matched your search

+3 -1
View File
@@ -79,7 +79,9 @@ func (pc *PktConn) WriteTo(b []byte, addr net.Addr) (int, error) {
defer pool.PutBytesBuffer(buf)
tgtLen, _ := buf.Write(target)
binary.Write(buf, binary.BigEndian, uint16(len(b)))
var hdr [2]byte
binary.BigEndian.PutUint16(hdr[:], uint16(len(b)))
buf.Write(hdr[:])
buf.WriteString("\r\n")
buf.Write(b)