mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-25 04:33:05 +00:00
update userlog
This commit is contained in:
@@ -6,7 +6,17 @@ skynet.register_protocol {
|
|||||||
id = skynet.PTYPE_TEXT,
|
id = skynet.PTYPE_TEXT,
|
||||||
unpack = skynet.tostring,
|
unpack = skynet.tostring,
|
||||||
dispatch = function(_, address, msg)
|
dispatch = function(_, address, msg)
|
||||||
print(string.format("%x(%.2f): %s", address, skynet.time(), msg))
|
print(string.format(":%08x(%.2f): %s", address, skynet.time(), msg))
|
||||||
|
end
|
||||||
|
}
|
||||||
|
|
||||||
|
skynet.register_protocol {
|
||||||
|
name = "SYSTEM",
|
||||||
|
id = skynet.PTYPE_SYSTEM,
|
||||||
|
unpack = function(...) return ... end,
|
||||||
|
dispatch = function()
|
||||||
|
-- reopen signal
|
||||||
|
print("SIGHUP")
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user