mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-23 11:33:09 +00:00
simplify clientsocket lib
This commit is contained in:
@@ -16,7 +16,11 @@ end
|
||||
skynet.start(function()
|
||||
skynet.dispatch("lua", function(session, address, cmd, ...)
|
||||
local f = command[string.upper(cmd)]
|
||||
skynet.ret(skynet.pack(f(...)))
|
||||
if f then
|
||||
skynet.ret(skynet.pack(f(...)))
|
||||
else
|
||||
error(string.format("Unknown command %s", tostring(cmd)))
|
||||
end
|
||||
end)
|
||||
skynet.register "SIMPLEDB"
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user