rewrite example testping

This commit is contained in:
Cloud Wu
2014-04-04 11:50:10 +08:00
parent 1a07e94ad5
commit 3be4e3c44b
2 changed files with 6 additions and 5 deletions

View File

@@ -3,8 +3,8 @@ local skynet = require "skynet"
skynet.start(function()
local ps = skynet.uniqueservice("pingserver")
skynet.watch(ps)
-- print(pcall(skynet.call,ps,"lua","ERROR"))
print(pcall(skynet.call,ps,"lua","ERROR"))
print(skynet.call(ps, "lua", "PING", "hello"))
print(skynet.call(ps, "lua", "PING", "hay"))
skynet.send(ps, "lua", "EXIT")
skynet.call(ps, "lua", "EXIT")
end)