Remove stack buffer usage

This commit is contained in:
世界
2023-07-03 21:45:32 +08:00
parent 9c8565cf21
commit 07ce5e0d22
16 changed files with 49 additions and 289 deletions

View File

@@ -128,13 +128,6 @@ func (c *slowOpenConn) NeedHandshake() bool {
return c.conn == nil
}
func (c *slowOpenConn) ReadFrom(r io.Reader) (n int64, err error) {
if c.conn != nil {
return bufio.Copy(c.conn, r)
}
return bufio.ReadFrom0(c, r)
}
func (c *slowOpenConn) WriteTo(w io.Writer) (n int64, err error) {
if c.conn == nil {
select {