初始化仓库:友乐/gameabc 房卡游戏平台脚手架(client + server + docs)

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-01 18:13:26 +08:00
co-authored by Claude Opus 5
commit 594820d393
655 changed files with 310861 additions and 0 deletions
+37
View File
@@ -0,0 +1,37 @@
///////////////////////////////////////////////////
////////////////////服务器心跳包///////////////////
///////////////////////////////////////////////////
var mod_heartbeat = mod_heartbeat || cls_mod.new("mod_heartbeat", "heartbeat", app_server);
// mod_heartbeat.TCPList = [];
//TCP客户端连接
// mod_heartbeat.OnTcpConnected = function(str_tcpid)
// {
// if (min_ary_indexof(mod_heartbeat.TCPList, str_tcpid) == -1)
// {
// if (str_tcpid){
// mod_heartbeat.TCPList.push(str_tcpid);
// }
// }
// }
//TCP客户端断开
// mod_heartbeat.OnTcpDisConnected = function(str_tcpid)
// {
// if (str_tcpid){
// min_ary_delval(mod_heartbeat.TCPList, str_tcpid);
// }
// }
//发送心跳包
mod_heartbeat.doheartbeat = function()
{
if ((mod_heartbeat.app) && (mod_heartbeat.app.SendPack_Tcp))
{
mod_heartbeat.app.SendPack_Tcp([-1], '{"com":"@serverheartbeat"}');
}
}
//开启定时器发送心跳包
min_ontime(mod_heartbeat.doheartbeat, 20000);