汉化 连接状态
This commit is contained in:
parent
e7fd71e410
commit
c422bcd643
|
@ -1,8 +1,9 @@
|
|||
-- GGELUA
|
||||
-- @Author: baidwwy
|
||||
-- @Date: 2020-11-03 00:48:47
|
||||
-- @Last Modified by: baidwwy
|
||||
-- @Last Modified time: 2020-11-03 02:14:23
|
||||
--[[
|
||||
@Author : baidwwy
|
||||
@Date : 2021-02-11 11:49:09
|
||||
@LastEditTime : 2021-03-04 17:32:48
|
||||
--]]
|
||||
|
||||
local string = string
|
||||
local _ENV = require "ghpsocket.hpsocket"
|
||||
|
||||
|
@ -15,5 +16,8 @@ function 取主机地址(host)
|
|||
return GetIPAddress(host)
|
||||
end
|
||||
|
||||
|
||||
SS_STARTING = "正在启动"
|
||||
SS_STARTED = "已经启动"
|
||||
SS_STOPPING = "正在停止"
|
||||
SS_STOPPED = "已经停止"
|
||||
return _ENV
|
|
@ -1,8 +1,9 @@
|
|||
-- GGELUA
|
||||
-- @Author: baidwwy
|
||||
-- @Date: 2020-10-18 22:24:25
|
||||
-- @Last Modified by: baidwwy
|
||||
-- @Last Modified time: 2020-11-01 21:07:16
|
||||
--[[
|
||||
@Author : baidwwy
|
||||
@Date : 2021-02-11 11:49:09
|
||||
@LastEditTime : 2021-03-04 17:34:41
|
||||
--]]
|
||||
local HPS = require("HPS.HPSocket")
|
||||
|
||||
local PushClient = class("PushClient")
|
||||
|
||||
|
@ -73,12 +74,8 @@ function PushClient:是否启动()
|
|||
return self._hp:HasStarted()
|
||||
end
|
||||
-- /* 查看通信组件当前状态 */
|
||||
-- SS_STARTING // 正在启动
|
||||
-- SS_STARTED // 已经启动
|
||||
-- SS_STOPPING // 正在停止
|
||||
-- SS_STOPPED // 已经停止
|
||||
function PushClient:取状态()
|
||||
return self._hp:GetState()
|
||||
return HPS[self._hp:GetState()]
|
||||
end
|
||||
|
||||
function PushClient:取错误代码()
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
-- GGELUA
|
||||
-- @Author: baidwwy
|
||||
-- @Date: 2020-02-05 08:30:08
|
||||
-- @Last Modified by: baidwwy
|
||||
-- @Last Modified time: 2020-10-25 01:03:22
|
||||
--[[
|
||||
@Author : baidwwy
|
||||
@Date : 2021-02-11 11:49:09
|
||||
@LastEditTime : 2021-03-04 17:34:03
|
||||
--]]
|
||||
local HPS = require("HPS.HPSocket")
|
||||
local Socket = class"Socket"
|
||||
|
||||
function Socket:停止()
|
||||
|
@ -42,13 +43,9 @@ end
|
|||
function Socket:是否启动()
|
||||
return self._hp:HasStarted()
|
||||
end
|
||||
-- /* 查看通信组件当前状态 */
|
||||
-- SS_STARTING // 正在启动
|
||||
-- SS_STARTED // 已经启动
|
||||
-- SS_STOPPING // 正在停止
|
||||
-- SS_STOPPED // 已经停止
|
||||
|
||||
function Socket:取状态()
|
||||
return self._hp:GetState()
|
||||
return HPS[self._hp:GetState()]
|
||||
end
|
||||
-- /* 获取连接数 */
|
||||
function Socket:取连接数()
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
-- GGELUA
|
||||
-- @Author: baidwwy
|
||||
-- @Date: 2020-02-05 08:30:08
|
||||
-- @Last Modified by: baidwwy
|
||||
-- @Last Modified time: 2020-10-25 00:30:45
|
||||
--[[
|
||||
@Author : baidwwy
|
||||
@Date : 2021-02-11 11:49:09
|
||||
@LastEditTime : 2021-03-04 17:35:12
|
||||
--]]
|
||||
local HPS = require("HPS.HPSocket")
|
||||
|
||||
local UdpNode = class"UdpNode"
|
||||
|
||||
|
@ -63,12 +64,8 @@ function UdpNode:是否启动()
|
|||
return self._hp:HasStarted()
|
||||
end
|
||||
-- /* 查看通信组件当前状态 */
|
||||
-- SS_STARTING // 正在启动
|
||||
-- SS_STARTED // 已经启动
|
||||
-- SS_STOPPING // 正在停止
|
||||
-- SS_STOPPED // 已经停止
|
||||
function UdpNode:取状态()
|
||||
return self._hp:GetState()
|
||||
return HPS[self._hp:GetState()]
|
||||
end
|
||||
--获取最近一次失败操作的错误代码
|
||||
function UdpNode:取错误代码()
|
||||
|
|
Loading…
Reference in New Issue