exit monitor

This commit is contained in:
云风
2013-08-06 13:44:41 +08:00
parent 6be6a8171f
commit ff6e4dc762
5 changed files with 65 additions and 10 deletions

14
service/simplemonitor.lua Normal file
View File

@@ -0,0 +1,14 @@
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)