Files
skynet/service/simplemonitor.lua
2013-08-06 13:44:41 +08:00

15 lines
316 B
Lua

local skynet = require "skynet"
-- It's a simple service exit monitor, you can do something more when a service exit.
skynet.register_protocol {
name = "client",
id = 3,
unpack = function() end,
dispatch = function(_, address)
print(string.format("[:%x] exit", address))
end
}
skynet.start(function() end)