client libraries synched in git

This commit is contained in:
antirez
2009-05-26 18:10:50 +02:00
parent e083d75262
commit d7fc9edb18
18 changed files with 533 additions and 454 deletions

View File

@ -9,10 +9,7 @@ class Redis
@commands = []
end
def get_response
end
def write(data)
def execute_command(data)
@commands << data
write_and_read if @commands.size >= BUFFER_SIZE
end
@ -22,10 +19,10 @@ class Redis
end
def write_and_read
@redis.write @commands.join
@redis.execute_command(@commands.join, true)
@redis.read_socket
@commands.clear
end
end
end
end