mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-23 03:23:08 +00:00
rewrite makefile, and remove luacode cache.
This commit is contained in:
12
test/pingqueue.lua
Normal file
12
test/pingqueue.lua
Normal file
@@ -0,0 +1,12 @@
|
||||
local skynet = require "skynet"
|
||||
local mqueue = require "mqueue"
|
||||
|
||||
skynet.start(function()
|
||||
local id = 0
|
||||
local pingserver = skynet.newservice "pingserver"
|
||||
mqueue.register(function(str)
|
||||
id = id + 1
|
||||
str = string.format("id = %d , %s",id, str)
|
||||
return skynet.call(pingserver, "lua", "PING", str)
|
||||
end)
|
||||
end)
|
||||
Reference in New Issue
Block a user