1
0
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:
Vladimir Mihailenco
2012-08-20 14:46:41 +03:00
parent 9ad848d04b
commit f56748aab9
4 changed files with 11 additions and 13 deletions

View File

@ -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),