mirror of
https://github.com/nadoo/glider.git
synced 2026-11-19 07:09:42 +08:00
pool: added bufio.Reader pool
This commit is contained in:
1 parent
c15c55fe05
commit
417ac556f7
29 files changed
+188
-168
No files matched your search
@@ -59,12 +59,12 @@ func NewClientConn(c net.Conn, uuid [16]byte, network, target string) (*ClientCo
|
||||
return nil, err
|
||||
}
|
||||
|
||||
buf := pool.GetWriteBuffer()
|
||||
defer pool.PutWriteBuffer(buf)
|
||||
buf := pool.GetBytesBuffer()
|
||||
defer pool.PutBytesBuffer(buf)
|
||||
|
||||
buf.WriteByte(Version) // ver
|
||||
buf.Write(uuid[:]) // uuid
|
||||
buf.WriteByte(0) // addLen
|
||||
buf.WriteByte(0) // addonLen
|
||||
|
||||
cmd := CmdTCP
|
||||
if network == "udp" {
|
||||
|
||||
Reference in new issue
Block a user