进程内的订阅同步
function M.new_server(CMD)
描述
新建发布端对象
参数
- CMD table lua CMD消息表
返回值
- table obj
function server:register(name, init_v)
描述
注册
参数
- name string 名称
- init_v number|string|table|nil 初始值
返回值
- table obj
function server:publish(name, new_value)
描述
发布新值
参数
- name string 名称
- new_value number|string|table|nil 初始值
返回值
- table obj
注意,目前实现上,(同一lua skynet服务下)订阅端不能同时存在2个及以上订阅对象去订阅同一个服务(lua skynet服务)
function M.new_client(rpc_interface)
描述
新建订阅端对象
参数
- rpc_interface table 交互的接口
返回值
- table obj
function client:watch(name)
描述
监听订阅
参数
- name string 名称
返回值
- boolean
进程内的订阅同步
https://huahua132.github.io/2024/06/29/skynet_fly_api_word/watch/watch_syn/