change source dir

This commit is contained in:
云风
2012-08-09 15:36:56 +08:00
parent d23c4aa905
commit eed9c42fd4
46 changed files with 284 additions and 118 deletions

17
service/agent.lua Normal file
View File

@@ -0,0 +1,17 @@
local skynet = require "skynet"
local client = ...
skynet.dispatch(function(msg, sz , session, address)
local message = skynet.tostring(msg,sz)
if session == 0 then
print("client command",msg)
local result = skynet.call("SIMPLEDB",msg)
skynet.send(client, result)
else
print("server command",msg)
if msg == "CLOSE" then
skynet.kill(client)
skynet.exit()
end
end
end)