mirror of
https://github.com/redis/go-redis.git
synced 2025-07-25 08:21:55 +03:00
Use net.Conn instead of io.ReadWriteCloser.
This commit is contained in:
@ -1,8 +1,8 @@
|
||||
package redis
|
||||
|
||||
import (
|
||||
"io"
|
||||
"log"
|
||||
"net"
|
||||
"os"
|
||||
"sync"
|
||||
|
||||
@ -10,11 +10,11 @@ import (
|
||||
)
|
||||
|
||||
type Conn struct {
|
||||
RW io.ReadWriteCloser
|
||||
RW net.Conn
|
||||
Rd reader
|
||||
}
|
||||
|
||||
func NewConn(rw io.ReadWriteCloser) *Conn {
|
||||
func NewConn(rw net.Conn) *Conn {
|
||||
return &Conn{
|
||||
RW: rw,
|
||||
Rd: bufio.NewReaderSize(rw, 1024),
|
||||
|
Reference in New Issue
Block a user