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

19
examples/agent.lua Normal file
View File

@@ -0,0 +1,19 @@
local skynet = require "skynet"
local client = ...
skynet.register_protocol {
name = "client",
id = skynet.PTYPE_CLIENT,
pack = function(...) return ... end,
unpack = skynet.tostring,
dispatch = function (session, address, text)
-- It's client, there is no session
-- skynet.send("LOG", "text", "client message :" .. text)
local result = skynet.call("SIMPLEDB", "text", text)
skynet.ret(result)
end
}
skynet.start(function()
skynet.send(client,"text","Welcome to skynet")
end)