MCPcopy Create free account
hub / github.com/IceFireDB/IceFireDB / NewConn

Function NewConn

IceFireDB-SQLProxy/pkg/mysql/packet/conn.go:70–81  ·  view source on GitHub ↗
(conn net.Conn)

Source from the content-addressed store, hash-verified

68}
69
70func NewConn(conn net.Conn) *Conn {
71 c := new(Conn)
72 c.Conn = conn
73
74 c.bufPool = NewBufPool()
75 c.br = bufio.NewReaderSize(c, defaultReaderSize) // 64kb
76 c.reader = c.br
77
78 c.copyNBuf = make([]byte, defaultReaderSize/4)
79
80 return c
81}
82
83func NewTLSConn(conn net.Conn) *Conn {
84 c := new(Conn)

Callers 5

ConnectFunction · 0.92
writeAuthHandshakeMethod · 0.92
NewConnFunction · 0.92
NewCustomizedConnFunction · 0.92
NewClientConnFunction · 0.92

Calls 1

NewBufPoolFunction · 0.70

Tested by

no test coverage detected