change name from pub/subscribe to post/accept

This commit is contained in:
Cloud Wu
2014-04-22 11:40:08 +08:00
parent 56fdbef851
commit 08c511160f
5 changed files with 12 additions and 12 deletions

View File

@@ -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)