rewrite makefile, and remove luacode cache.

This commit is contained in:
Cloud Wu
2014-03-26 15:13:30 +08:00
parent 103602259a
commit 58aa7556a5
107 changed files with 20585 additions and 1070 deletions

26
test/pingserver.lua Normal file
View File

@@ -0,0 +1,26 @@
local skynet = require "skynet"
local command = {}
function command.PING(hello)
skynet.ret(skynet.pack(hello))
end
function command.HELLO()
skynet.sleep(100)
skynet.ret(skynet.pack("hello"))
end
function command.EXIT()
skynet.exit()
end
function command.ERROR()
error "throw an error"
end
skynet.start(function()
skynet.dispatch("lua", function(session,addr, cmd, ...)
command[cmd](...)
end)
end)