Pass a io.ReadWriteCloser instead of net.Conn