mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-24 20:23:06 +00:00
use snax.newservice would be better
This commit is contained in:
@@ -2,7 +2,7 @@ local skynet = require "skynet"
|
|||||||
local snax = require "snax"
|
local snax = require "snax"
|
||||||
|
|
||||||
skynet.start(function()
|
skynet.start(function()
|
||||||
local ps = snax.uniqueservice ("pingserver", "hello world")
|
local ps = snax.newservice ("pingserver", "hello world")
|
||||||
print(ps.req.ping("foobar"))
|
print(ps.req.ping("foobar"))
|
||||||
print(ps.post.hello())
|
print(ps.post.hello())
|
||||||
print(pcall(ps.req.error))
|
print(pcall(ps.req.error))
|
||||||
|
|||||||
Reference in New Issue
Block a user