remove skynet.watch, move simplemonitor to examples

This commit is contained in:
Cloud Wu
2014-05-06 14:57:01 +08:00
parent 0c4e2450a7
commit a700abcdb3
9 changed files with 62 additions and 47 deletions

27
test/testdeadcall.lua Normal file
View File

@@ -0,0 +1,27 @@
local skynet = require "skynet"
local mode = ...
if mode == "test" then
skynet.start(function()
skynet.dispatch("lua", function (...)
print("====>", ...)
skynet.exit()
end)
end)
else
skynet.start(function()
local test = skynet.newservice("testdeadcall", "test") -- launch self in test mode
print(pcall(function()
skynet.send(test,"lua", "hello world")
skynet.send(test,"lua", "never get there")
skynet.call(test,"lua", "fake call")
end))
skynet.exit()
end)
end