mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-25 04:33:05 +00:00
new harbor
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -2,7 +2,7 @@ local skynet = require "skynet"
|
||||
|
||||
print("Log server start")
|
||||
|
||||
local log = skynet.launch("snlua","globallog.lua")
|
||||
local log = skynet.launch("snlua","globallog")
|
||||
print("log",log)
|
||||
|
||||
skynet.exit()
|
||||
|
||||
Reference in New Issue
Block a user