support multi protocol

This commit is contained in:
云风
2012-08-31 21:18:19 +08:00
parent 1ee802c5c5
commit 0a886cd57c
47 changed files with 542 additions and 520 deletions

View File

@@ -1,8 +1,8 @@
local skynet = require "skynet"
skynet.dispatch(function(msg, sz , session , from)
local message = skynet.tostring(msg,sz)
print("[GLOBALLOG]", skynet.address(from),message)
skynet.start(function()
skynet.dispatch("text", function(session, address, text)
print("[GLOBALLOG]", skynet.address(address),text)
end)
skynet.register "LOG"
end)
skynet.register "LOG"