- 积分
- 6
- 阅读权限
- 100
- 鲜花
- 0
- 猫粮
- 23
- 在线时间
- 17 小时
- 精华
- 0
- 注册时间
- 2019-6-18
- 性别
- 保密
- 最后登录
- 2023-2-23
Lua插件编程班学员
- 鲜花
- 0
- 猫粮
- 23
|
发表于 2021-2-26 15:52:54
|
显示全部楼层
Function 写配置(softid, username, config, value) Dim sendtext = Encode.TableToJson({"命令":"写配置","参数":{"softid":softid,"username":username,"config":config,"value":value}}) socket.CliendConnect "192.168.2.2", 33000 socket.ClientSend (sendtext) End Function Function 读配置(softid, username, config,default) Dim sendtext = Encode.TableToJson({"命令":"读配置","参数":{"softid":softid,"username":username,"config":config}}) socket.CliendConnect "192.168.2.2", 33000 socket.ClientSend (sendtext) dim ret = socket.ClientReceive() If IsNull(ret) or ret = "error" Then 读配置 = default Else 读配置 = ret End If End Function Function 写日志(softid,username,text) Dim sendtext = Encode.TableToJson({"命令":"写日志","参数":{"softid":softid,"username":username,"text":text}}) socket.CliendConnect "192.168.2.2", 33000 socket.ClientSend (sendtext) End Function |
|