mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-22 02:53:09 +00:00
update userlog
This commit is contained in:
@@ -6,7 +6,17 @@ skynet.register_protocol {
|
||||
id = skynet.PTYPE_TEXT,
|
||||
unpack = skynet.tostring,
|
||||
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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user