mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-24 03:53:09 +00:00
add skynet.watch for skynet.call, read http://blog.codingnow.com/2013/12/skynet_monitor.html
This commit is contained in:
9
service/testping.lua
Normal file
9
service/testping.lua
Normal file
@@ -0,0 +1,9 @@
|
||||
local skynet = require "skynet"
|
||||
|
||||
skynet.start(function()
|
||||
local ps = skynet.uniqueservice("pingserver")
|
||||
skynet.watch(ps)
|
||||
print(skynet.call(ps, "lua", "PING", "hello"))
|
||||
skynet.send(ps, "lua", "EXIT")
|
||||
print(skynet.call(ps, "lua", "PING", "hay"))
|
||||
end)
|
||||
Reference in New Issue
Block a user