mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-24 03:53:09 +00:00
simple rpc support
This commit is contained in:
12
testdb.lua
Normal file
12
testdb.lua
Normal file
@@ -0,0 +1,12 @@
|
||||
local skynet = require "skynet"
|
||||
|
||||
-- register a dummy callback function
|
||||
skynet.dispatch()
|
||||
|
||||
skynet.start(function()
|
||||
local result = skynet.call("SIMPLEDB","SET foobar hello")
|
||||
print(result)
|
||||
result = skynet.call("SIMPLEDB","GET foobar")
|
||||
print(result)
|
||||
skynet.exit()
|
||||
end)
|
||||
Reference in New Issue
Block a user