mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-24 03:53:09 +00:00
change name from pub/subscribe to post/accept
This commit is contained in:
@@ -8,7 +8,7 @@ function response.ping(hello)
|
||||
return hello
|
||||
end
|
||||
|
||||
function subscribe.hello()
|
||||
function accept.hello()
|
||||
i = i + 1
|
||||
print (i, hello)
|
||||
end
|
||||
|
||||
@@ -4,14 +4,14 @@ local snax = require "snax"
|
||||
skynet.start(function()
|
||||
local ps = snax.newservice ("pingserver", "hello world")
|
||||
print(ps.req.ping("foobar"))
|
||||
print(ps.pub.hello())
|
||||
print(ps.post.hello())
|
||||
print(pcall(ps.req.error))
|
||||
print("Hotfix (i) :", snax.hotfix(ps, [[
|
||||
|
||||
local i
|
||||
local hello
|
||||
|
||||
function subscribe.hello()
|
||||
function accept.hello()
|
||||
i = i + 1
|
||||
print ("fix", i, hello)
|
||||
end
|
||||
@@ -23,7 +23,7 @@ function hotfix(...)
|
||||
end
|
||||
|
||||
]]))
|
||||
print(ps.pub.hello())
|
||||
print(ps.post.hello())
|
||||
print(snax.kill(ps,"exit"))
|
||||
skynet.exit()
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user