new harbor

This commit is contained in:
云风
2012-08-17 11:50:45 +08:00
parent b06d380219
commit 4f6826de40
25 changed files with 331 additions and 1010 deletions

View File

@@ -4,12 +4,12 @@ local client = ...
local session_id = 0
skynet.filter(function (session, address , msg, sz)
if session == 0x7fffffff then
print("client message",skynet.tostring(msg,sz))
skynet.send("LOG", "client message :" .. skynet.tostring(msg,sz))
-- It's client, there is no session
session_id = session_id + 1
session = - session_id
else
print("skynet message",msg,sz)
skynet.send("LOG", "skynet message")
end
return session, address , msg, sz
end, function (msg,sz)