new socket service and socket lib instead of old connection, and rewrite redis lib

This commit is contained in:
云风
2013-06-21 13:02:51 +08:00
parent 0ffd9b8b8e
commit 277b6957cb
16 changed files with 1182 additions and 1248 deletions

View File

@@ -3,10 +3,11 @@ local redis = require "redis"
skynet.start(function()
local db = redis.connect "main"
print(db:select(0))
db:batch "write" -- ignore results
db:set("A", "hello")
db:set("B", "world")
db:batch "end"
print(db:batch "end")
db:batch "read"
db:get("A")
@@ -19,6 +20,7 @@ skynet.start(function()
print(db:get "A")
print(db:set("A","hello world"))
print(db:get("A"))
db:disconnect()
skynet.exit()
end)