otiai10 / rodeo

Simple Redis Client for Golang
http://godoc.org/github.com/otiai10/rodeo
13 stars 1 forks source link

Variable length io read #26

Open otiai10 opened 10 years ago

otiai10 commented 10 years ago

As is https://github.com/otiai10/rodeo/blob/master/protocol/redis/redis.go#L110-L115

    // bufSize = 0xffff
    tcpConnReader := bufio.NewReaderSize(conn, bufSize)

    fmt.Fprintf(conn, string(message))

    response := make([]byte, bufSize)
    _, rerr := tcpConnReader.Read(response)